ObjectiveGiven that long-term opioid usage is an important problem worldwide and postsurgical pain is a common indication for opioid prescription, our primary objective was to describe the frequency of new prolonged opioid consumption after major surgery in Sweden and, second, to evaluate potential associated risk factors.DesignCohort study including data from 1 January 2007 to 31 December 2014. Data regarding surgical procedures, baseline characteristics and outcomes was retrieved from the Orbit surgical planning system, the Swedish national patient register and the Swedish cause of death register.SettingObservational multicentre cohort study with data from 23 Swedish hospitals.ParticipantsWe included 216 877 patients aged ≥18 years, undergoing non-cardiac surgery, not exposed to opioids 180 days before and alive 12 months after surgery.Primary and secondary outcome measuresThe primary endpoint was collection of at least three opioid prescriptions during the first postoperative year; within 90 days, day 91–180 and 181–365 after surgery in a previously opioid-naïve patient. Second, multivariable logistic regression analysis was conducted to explore potential risk factors associated with prolonged opioid use.ResultsOf the 216 877 patients identified to undergo analysis, 15 081 (7.0%) developed new prolonged opioid consumption. Several risk factors were identified. Having a history of psychiatric disease was identified as the strongest risk factor (adjusted odds ratio: 1.94; 95% CI: 1.87 to 2.00).ConclusionIn a large Swedish cohort of surgical patients, 7% developed new prolonged opioid consumption after major surgery. Our data on susceptible patients could help clinicians reduce the number of prolonged opioid users by adapting their analgesic and preventative strategies.