Using data from Truven Health MarketScan Commercial Claims and Encounters Database between 2009 and 2015, we studied the effects of medical and recreational marijuana laws on opioid prescribing in employer-sponsored health insurance. We used a differences-in-differences (DD) approach and found that the implementation of medical marijuana laws (MMLs) and recreational marijuana laws (RMLs) reduced morphine milligram equivalents per enrollee by 7% and 13%, respectively. The reduction associated with MMLs was predominately in people aged 55-64, whereas the reduction associated with RMLs was largely in people aged 35-44 and aged 45-54. Our findings suggest that both MMLs and RMLs have the potential to reduce opioid prescribing in the privately insured population, especially for the middle-aged population.