IMPORTANCE: Obesity is associated with chronic noncancer pain. It is not known if opioid use for chronic pain in obese individuals undergoing bariatric surgery is reduced. OBJECTIVES: To determine opioid use following bariatric surgery in patients using opioids chronically for pain control prior to their surgery and to determine the effect of preoperative depression, chronic pain, or postoperative changes in body mass index (BMI) on changes in postoperative chronic opioid use. DESIGN, SETTING, AND PARTICIPANTS: Retrospective cohort study in a distributed health network (10 demographically and geographically varied US health care systems) of 11,719 individuals aged 21 years and older, who had undergone bariatric surgery between 2005 and 2009, and were assessed 1 year before and after surgery, with latest follow-up by December 31, 2010. MAIN OUTCOMES AND MEASURES: Opioid use, measured as morphine equivalents 1 year before and 1 year after surgery, excluding the first 30 postoperative days. Chronic opioid use is defined as 10 or more opioid dispensings over 90 or more days or as dispensings of at least a 120-day supply of opioids during the year prior to surgery. RESULTS: Before surgery, 8% (95% CI, 7%-8%; n = 933) of bariatric patients were chronic opioid users. Of these individuals, 77% (95% CI, 75%-80%; n = 723) continued chronic opioid use in the year following surgery. Mean daily morphine equivalents for the 933 bariatric patients who were chronic opioid users before surgery were 45.0 mg (95% CI, 40.0-50.1) preoperatively and 51.9 mg (95% CI, 46.0-57.8) postoperatively (P < .001). For this group with chronic opiate use prior to surgery, change in morphine equivalents before vs after surgery did not differ between individuals with loss of more than 50% excess BMI vs those with 50% or less (>50% BMI loss: adjusted incidence rate ratio [adjusted IRR, 1.17; 95% CI, 1.07-1.28] vs =50% BMI loss [adjusted IRR, 1.03; 95% CI, 0.93-1.14] model interaction, P = .06). In other subgroup analyses of preoperative chronic opioid users, changes in morphine equivalents before vs after surgery did not differ between those with or without preoperative diagnosis of depression or chronic pain (depression only [n = 75; IRR, 1.08; 95% CI, 0.90-1.30]; chronic pain only [n = 440; IRR, 1.17; 95% CI, 1.08-1.27]; both depression and chronic pain [n = 226; IRR, 1.11; 95% CI, 0.96-1.28]; neither depression nor chronic pain [n = 192; IRR, 1.22; 95% CI, 0.98-1.51); and P values for model interactions when compared with neither were P = .42 for depression, P = .76 for pain, and P = .48 for both. CONCLUSIONS AND RELEVANCE: In this cohort of patients who underwent bariatric surgery, 77% of patients who were chronic opioid users before surgery continued chronic opioid use in the year following surgery, and the amount of chronic opioid use was greater postoperatively than preoperatively. These findings suggest the need for better pain management in these patients following surgery.