Long-term opioid use was common among patients with metastatic disease who were at the end of life, but earlier initiation of long-term use had some benefits.