ImportanceThere are known risks of using opioids for extended periods. However, less is known about the long-term trajectories of opioid use following initiation.ObjectiveTo identify 5-year trajectories of prescription opioid use, and to examine the characteristics of each trajectory group.Design, Setting, and ParticipantsThis population-based cohort study conducted in New South Wales, Australia, linked national pharmaceutical claims data to 10 national and state data sets to determine sociodemographic characteristics, clinical characteristics, drug use, and health services use. The cohort included adult residents (aged ≥18 years) of New South Wales who initiated a prescription opioid between July 1, 2003, and December 31, 2018. Statistical analyses were conducted from February to September 2022.ExposureDispensing of a prescription opioid, with no evidence of opioid dispensing in the preceding 365 days, identified from pharmaceutical claims data.Main Outcomes and MeasuresThe main outcome was the trajectories of monthly opioid use over 60 months from opioid initiation. Group-based trajectory modeling was used to classify these trajectories. Linked health care data sets were used to examine characteristics of individuals in different trajectory groups.ResultsAmong 3 474 490 individuals who initiated a prescription opioid (1 831 230 females [52.7%]; mean [SD] age, 49.7 [19.3] years), 5 trajectories of long-term opioid use were identified: very low use (75.4%), low use (16.6%), moderate decreasing to low use (2.6%), low increasing to moderate use (2.6%), and sustained use (2.8%). Compared with individuals in the very low use trajectory group, those in the sustained use trajectory group were older (age ≥65 years: 22.0% vs 58.4%); had more comorbidities, including cancer (4.1% vs 22.2%); had increased health services contact, including hospital admissions (36.9% vs 51.6%); had higher use of psychotropic (16.4% vs 42.4%) and other analgesic drugs (22.9% vs 47.3%) prior to opioid initiation, and were initiated on stronger opioids (20.0% vs 50.2%).Conclusions and relevanceResults of this cohort study suggest that most individuals commencing treatment with prescription opioids had relatively low and time-limited exposure to opioids over a 5-year period. The small proportion of individuals with sustained or increasing use was older with more comorbidities and use of psychotropic and other analgesic drugs, likely reflecting a higher prevalence of pain and treatment needs in these individuals.