Postoperative pain management is particularly challenging in patients using opioids preoperatively, but previous studies have not stratified patients not using opioids at the time of surgery according to history of opioid use. This study was designed to test the hypothesis that history of opioid use among patients not reporting opioid use at the time of surgery was independently associated with new persistent opioid use after surgery.Using prospective perioperative data from the Analgesic Outcomes Study, we assessed outcomes of patients 18 years of age or older who underwent elective surgery between December 2015 and January 2019 and were not using opioids at the time of surgery. Patient self-reported outcome measures were collected on the day of surgery and at 2 weeks, 1 month, and 3 months postoperatively. The primary outcome was new persistent opioid use, defined as continued opioid use 3 months after surgery. The primary explanatory variable was history of opioid use, which was categorized as no history of opioid use, history of non-continuous opioid use, or history of continuous opioid use (defined as daily or almost every day for 3 months or longer). Other covariates included demographics, validated measures (pain, mood), surgery type and approach, comorbidities, and use of tobacco, alcohol, cannabis, and benzodiazepines. Backward stepwise logistic regression models were used to determine patient factors associated with new persistent opioid use and refill after surgery.A total of 1,249 patients not taking opioids preoperatively were included in the study cohort for new persistent opioid use. A total of 54 (4.3%) patients had continued use 3 months after surgery. New persistent opioid use after surgery was independently associated with non-continuous opioid use history (adjusted odds ratio 2.9, [95% confidence interval, 1.21 to 6.94]), continuous opioid use history (adjusted odds ratio 5.0, [95% confidence interval, 1.48 to 16.76]), and moderate to high alcohol use (adjusted odds ratio 2.5, [95% confidence interval, 1.24 to 4.93]). Similarly, opioid prescription refill at 1 month after surgery was independently associated with history of non-continuous opioid use (adjusted odds ratio 1.6, [95% confidence interval, 1.12 to 2.24]), history of continuous opioid use (adjusted odds ratio 2.2, [95% confidence interval, 1.15 to 4.06]), and moderate to high alcohol use (adjusted odds ratio 1.7, [95% confidence interval, 1.18 to 2.48]).Among patients not using opioids preoperatively, a history of opioid use was independently associated with new persistent opioid use after surgery, especially those with a history of continuous opioid use.