For over two decades, dramatic increases in opioid prescriptions in the developed world, especially for long-term management of chronic noncancer pain, were accompanied by increases in patient harm. In recent years in the USA, opioid-related deaths rates have continued to increase despite falls in prescribing rates and deaths associated with prescription opioids. In large part, this is attributed to the growing availability of illicitly manufactured fentanyl. Increased opioid use, for medical and nonmedical reasons, has led to more opioid-tolerant patients requiring management of acute pain. The potential harms associated with long-term opioid use are now well known. What may be less well understood is that preoperative long-term opioid use is associated with increased perioperative complications including infection, readmissions, and greater healthcare utilisation and costs. Minimizing opioid use prior to surgery is a modifiable risk factor that could benefit both patient and healthcare system. Management of acute pain should include simple analgesics and adjuvants, with short-term opioid dose increases if needed and use of non-pharmacological strategies. Reported pain intensities may be high and titration of analgesia to function rather than pain scores is appropriate. Importantly, compared with opioid-naive patients, opioid-tolerant patients may be at higher risk of opioid-induced ventilatory impairment when additional opioids are administered to manage new acute pain. For some patients, perioperative care may be best coordinated by a perioperative or post-discharge service with referral to multidisciplinary pain and addiction medicine services as indicated. Carefully planned and communicated discharge prescribing, with a weaning plan for additional opioids, is essential.