Primary care clinicians commonly encounter patients with substance use disorders and can provide effective treatment for their problems. Many of the medical complications associated with drug use are due to the use of needles; these include transmission of HIV and hepatitis C, soft tissue infections, and endocarditis. Harm reduction strategies reduce the harms associated with drug use without targeting use itself; these include syringe distribution, safe consumption facilities, naloxone distribution, and pre-exposure HIV prophylaxis. Patients on opioid agonist treatment may develop a number of problems, including hypogonadism, constipation, and psychomotor impairment; those on methadone may develop prolonged QT syndrome. Other issues include drug interactions, treatment of acute pain, and perioperative care. Treating pain in patients with substance use disorder can be complicated; for many, especially those with opioid use disorder, treatment with buprenorphine or enrollment in methadone maintenance is the best option.