I met Shirelle as she entered treatment for cocaine addiction at the height of the crack epidemic in the 1980s. An ancient-looking African-American woman who was in fact in her late 30s, she met my gaze with a look that I had seen all over the blighted neighborhoods of Detroit: a disturbing combination of twitchy facial movements and inert, vacant eyes. Feeling ashamed and suicidal about how her addiction was destroying her family, she had entered treatment—out of desperation, not with any confidence that it would help her.

Shirelle had already been through rehab, counseling and 12-step meetings, to no avail. She spoke slowly because her lips were badly burned from her crack pipe, but her direct question was easily understood: "Isn't there anything else?" "Not really," I responded.

As an expert in addiction treatment, what depresses me is that a quarter-century later, I would still have to give her the same answer. But another possibility is now on the horizon: a vaccine for addiction to cocaine and other stimulant drugs.

The idea of using the body's immune system to combat the effects of addictive drugs goes back to animal studies conducted in the early 1970s, but the first evidence that a vaccine could help people with cocaine addiction didn't emerge until 2009. In a groundbreaking clinical trial, Thomas Kosten of Baylor College of Medicine and his colleagues tested a vaccine that combines molecules of cocaine with a harmless component of cholera. Sensing what appears to be an emerging infection, the body generates an immune response to the cholera that extends to the cocaine. At the end of the trial, patients whose bodies generated a strong immune response to the vaccine had almost 30% more cocaine-free drug tests than did patients who generated a weak response or who received a placebo.

What would such a vaccine mean to a cocaine addict like Shirelle? Her body would treat the drug like an invading germ and produce antibodies that bind to it and change its size and shape. The cocaine she ingested, which once would have crossed into her brain rapidly and en masse, would get there slowly, if at all. In colloquial terms, cocaine would be no fun for her anymore. The theory, which Dr. Kosten's study went some way to support, is that when cocaine addicts no longer get a euphoric rush from the drug, they will stop using it.