Substance abuse complicates pain management. The comorbidity of substance abuse and pain is particularly problematic in the United States and Canada, substantially more than in most countries with advanced health care systems. Treatment of pain with long-term opioids, particularly in high doses, is known to be associated with substantial medical comorbidity, unintentional overdoses, and death. Treatment of opioid dependence in the chronic pain patient is necessary for effective pain management, whether or not the patient uses drugs illicitly. Opioids, particularly in high doses, produce central nervous system neuroadaptations that reduce or eliminate analgesic effectiveness and enhance sensitivity to pain in general. The neuroadaptations often result in opioid dependency and, in the long-term, craving. Weaning patients from chronic opioids can be exquisitely difficult if simple dose reduction is attempted. The process can be quite successful and gratifying, however, if certain principles are followed. These include education, comfortable detoxification using long-acting opioids, usually methadone or buprenorphine, nonopioid pain management, psychological support, and coordinated care.