ABSTRACT: Importance:Adults with mental health conditions are more likely than those without to receive long-term opioid therapy. Less is known about opioid therapy among adolescents, especially those with mental health conditions. Objective:To examine associations between preexisting mental health conditions and treatments and initiation of any opioid and long-term opioid therapy among adolescents. Design, Setting, and Participants:A cohort of 1 224 520 incident opioid recipients without cancer diagnoses aged 14 to 18 years at first receipt was extracted from nationwide commercial health care claims data from January 1, 2003, to December 31, 2014. Analysis was conducted from August 19, 2016, to November 16, 2017. Associations between preexisting mental health conditions and treatments and any opioid receipt were examined by comparing recipients with nonrecipients matched on sex, calendar year and years of age of first enrollment, and months of enrollment (prior to the index month for recipients, ever for nonrecipients). Associations between preexisting mental health conditions and treatments and subsequent long-term opioid therapy were examined among recipients with at least 6 months' follow-up using Cox proportional hazards regressions adjusted for demographics. Exposures:Mental health condition diagnoses and treatments recorded in inpatient, outpatient, and filled-prescription claims prior to opioid receipt. Main Outcomes and Measures:Opioid receipt, defined as any opioid analgesic prescription claim, and long-term opioid therapy, defined as more than 90 days' supply within a 6-month window having no gaps in supply of more than 32 days. Results:Of the 1 224 520 new opioid recipients included, the median age at first receipt was 17 years (interquartile range, 16-18 years), and 51.1% were female. Median follow-up after first receipt was 625 days (interquartile range, 255-1268 days). Adolescents with anxiety, mood, neurodevelopmental, sleep, and nonopioid substance use disorders and most mental health treatments were significantly more likely to receive any opioid (odds ratios from 1.13 [95% CI, 1.10-1.16] for nonopioid substance use disorders to 1.69 [95% CI, 1.58-1.81] for nonbenzodiazepine hypnotics). Among the 1 000 453 opioid recipients (81.7%) who had at least 6 months' follow-up, the cumulative incidence of long-term opioid therapy was 3.0 (95% CI, 2.8-3.1) per 1000 recipients within 3 years after first opioid receipt. All preexisting mental health conditions and treatments were strongly associated with higher rates of long-term opioid therapy (adjusted hazard ratios from 1.73 [95% CI 1.54-1.95] for attention-deficit/hyperactivity disorder to 8.90 [95% CI, 5.85-13.54] for opioid use disorder). Conclusions and Relevance:Commercially insured adolescents with many types of preexisting mental health conditions and treatments were modestly more likely to receive any opioid and were substantially more likely to subsequently transition to long-term opioid therapy relative to those without, although overall rates of long-term opioid therapy were low.