U.S. state electronic prescription drug monitoring programs (PDMPs) are associated with reduced opioid dispensing among people with chronic pain and may impact use of other chronic pain treatments. In states with medical cannabis laws (MCLs), patients can use cannabis for chronic pain management, reducing their need for chronic-pain related treatment visits and moderating effects of PDMP laws. Given high rates of chronic pain among Medicaid enrollees, we examined associations between PDMP enactment in the presence or absence of MCL on chronic pain-related outpatient and emergency department (ED) visits. We created annual cohorts of Medicaid enrollees with chronic pain diagnoses using national Medicaid claims data from 2002-2013 and 2016. Negative binomial hurdle models produced adjusted odds ratios (aOR) for the likelihood of any chronic pain-related outpatient or ED visit and incident rate ratios (IRR) for the rate of visits among patients with ≥ 1 visit. Medicaid enrollees aged 18-64years with chronic pain (N = 4,878,462). A 3-level state-year variable with the following categories: 1) no PDMP, 2) PDMP enactment in the absence of MCL, or 3) PDMP enactment in the presence of MCL. Healthcare codes for chronic pain-related outpatient and ED visits each year. The sample was primarily female (67.2%), non-Hispanic White (51.2%), and ages 40-55years (37.2%). Compared to no-PDMP states, PDMP enactment in the absence of MCL was not associated with chronic pain-related outpatient visits but PDMP enactment in the presence of MCL was associated with lower odds of chronic pain-related outpatient visits (aOR = 0.81, 95% CI:0.71-0.92). PDMP enactment was not associated with ED visits, irrespective of MCL. During a period of PDMP and MCL expansion, our findings suggest treatment shifts for persons with chronic pain away from outpatient settings, potentially related to increased use of cannabis for chronic pain management.