ImportancePatients with chronic pain often receive long-term opioid therapy (LOT), which places them at risk of opioid use disorder and overdose. This presents the need for alternative or companion treatments; however, few studies on the association of medical cannabis (MC) with reducing opioid dosages exist.ObjectiveTo assess changes in opioid dosages among patients receiving MC for longer duration compared with shorter duration.Design, Setting, and ParticipantsThis cohort study of New York State Prescription Monitoring Program data from 2017 to 2019 included patients receiving MC for chronic pain while also receiving opioid treatment. Of these, patients receiving LOT prior to receiving MC were selected. Individuals were studied for 8 months after starting MC. Data were analyzed from November 2021 to February 2022.ExposuresSelected patients were divided into 2 groups based on the duration of receiving MC: the nonexposure group received MC for 30 days or fewer, and the exposure group received MC for more than 30 days.Main Outcomes and MeasuresThe main outcome was opioid dosage, measured by mean daily morphine milligram equivalent (MME). Analyses were conducted for 3 strata by opioid dosage prior to receiving MC: MME less than 50, MME of 50 to less than 90, and MME of 90 or greater.ResultsA total of 8165 patients were included, with 4041 (median [IQR] age, 57 [47-65] years; 2376 [58.8%] female) in the exposure group and 4124 (median [IQR] age, 54 (44-62) years; 2370 [57.5%] female) in the nonexposure group. Median (IQR) baseline MMEs for the exposure vs nonexposure groups were 30.0 (20.0-40.0) vs 30.0 (20.0-40.0) in the lowest stratum, 60.0 (60.0-70.0) vs 60.0 (60.0-90.0) in the middle stratum, and 150.0 (100.0-216.2) vs 135.0 (100.0-218.0) in the highest stratum. During follow-up, significantly greater reductions in opioid dosage were observed among the exposure group. A dose-response association of patients’ opioid dosage at baseline was observed with the differences in the monthly MME reductions between exposure and nonexposure groups, with a difference of −1.52 (95% CI, −1.67 to −1.37) MME for the lowest stratum, −3.24 (95% CI, −3.61 to −2.87) MME for the middle stratum, and −9.33 (95% CI, −9.89 to −8.77) MME for the highest stratum. The daily MME for the last month of the follow-up period among patients receiving longer MC was reduced by 48% in the lowest stratum, 47% in the middle stratum, and 51% in the highest stratum compared with the baseline dosages. Among individuals in the nonexposure group, daily MME was reduced by only 4% in the lowest stratum, 9% in the middle stratum, and 14% in the highest stratum.Conclusions and RelevanceIn this cohort study of patients receiving LOT, receiving MC for a longer duration was associated with reductions in opioid dosages, which may lower their risk of opioid-related morbidity and mortality.