Codeine comes from the opium poppy plant (Papaver somniferum), the same plant that produces morphine and other opiates. It occurs naturally in the milky latex that oozes from the seed pods when they’re scored with a blade. However, most codeine used in medicine today isn’t extracted directly from poppies. It’s manufactured in labs by chemically modifying morphine, which is far more abundant in raw opium.
Codeine in the Opium Poppy
Raw opium contains only small amounts of codeine, typically between 1% and 4% by weight depending on where the poppies are grown. Turkish and Yugoslavian opium historically contained about 1.25% codeine, while Iranian opium averaged 3.4% and Indian opium around 3%. The highest natural concentrations, averaging about 4.3%, came from poppies grown in northeastern Asia, particularly Korea and northern China. For comparison, the same raw opium contains roughly 10% to 15% morphine, making morphine far easier and cheaper to harvest directly.
Inside the poppy plant, codeine is actually a step along the pathway the plant uses to make morphine. The plant first produces a compound called thebaine, then converts it into codeine through a series of enzyme-driven reactions. Codeine is then converted into morphine by yet another enzyme. So in the plant’s own chemistry, codeine is essentially morphine’s precursor, not a separate end product.
How Codeine Is Made Commercially
Because raw opium yields so little codeine relative to the global demand for it, pharmaceutical manufacturers take a more efficient route. They extract morphine from opium in bulk, then chemically convert it into codeine. The conversion involves a single structural change: attaching a small carbon-based group (a methyl group) to one of morphine’s oxygen atoms. This process, called methylation, is straightforward and well-established in industrial chemistry.
The structural difference between the two molecules is minimal. Morphine has two exposed oxygen-containing groups, while codeine has one of those groups capped with a methyl group. That tiny change is what makes codeine weaker. It’s roughly 10 to 12 times less potent than morphine as a painkiller. In fact, codeine only works because your liver partially converts it back into morphine after you take it. About 5% to 10% of an ingested dose gets converted to morphine by a liver enzyme, and that small amount of morphine is what actually relieves pain.
Why Codeine Is a “Prodrug”
Codeine is classified as a prodrug, meaning it’s largely inactive on its own and relies on your body’s metabolism to produce the compound that does the real work. After you swallow codeine, your liver processes it in several ways. The majority, around 70% to 80%, gets neutralized and prepared for elimination. A smaller fraction, roughly 5% to 10%, gets converted into morphine. Another 10% or so becomes a related compound called norcodeine. It’s that 5% to 10% morphine conversion that provides pain relief.
This creates a problem: not everyone’s liver performs that conversion at the same rate. Some people are “ultra-rapid metabolizers” who convert codeine to morphine too quickly, risking dangerous side effects. Others are “poor metabolizers” who barely convert any at all, getting little to no pain relief. This genetic variability is one reason the World Health Organization removed codeine from its essential medicines list for children in 2011, and why some researchers have argued it should be reconsidered for adults as well.
Medical Uses and Limitations
Codeine has been widely used for three purposes: pain relief, cough suppression, and treating diarrhea. Its role in pain management is the most straightforward, though its effectiveness varies significantly from person to person due to the metabolic differences described above. As a cough suppressant, the evidence is surprisingly thin. Despite decades of use in cough syrups, there’s a lack of reliable clinical evidence showing codeine actually works for either acute or chronic cough.
Lab-Grown Codeine From Yeast
Scientists have engineered baker’s yeast to produce opioid compounds from simple sugar, a proof-of-concept that could someday offer an alternative to poppy farming. The engineered yeast strains required 21 to 23 different enzyme activities borrowed from plants, mammals, and bacteria to reconstruct the poppy’s natural chemistry in a single-celled organism. The yields, however, are extremely low. Engineered yeast produced about 6.4 micrograms per liter of thebaine (the precursor to codeine), and even less of other opioids. Researchers estimate that production would need to improve by more than 100,000-fold before yeast-based manufacturing could compete with poppy farming. For now, the opium poppy remains the sole practical source of the raw material used to make codeine.

