Epic First Cocaine Synthesis (Total Synthesis by Wilstätter)

Watch the video on the first total synthesis of cocaine on YouTube!

Did you know that while Coca Cola was getting consumers casually coked up in the late 19th century, chemistry titans were fighting an epic battle around cocaine synthesis? With a Nobel Prize on the line, the stakes were high, cocaine’s structural complexity was high… and everybody else was high too.

Keep watching to learn more about this molecule, as we dive deep into its history and chemistry. Regardless of if you’re a science nerd or amateur, you will learn a ton today – from nice history trivia and tales of careless, chain-smoking chemists, to innovative synthetic strategies that will remain classics in chemistry forever.

This content is purely educational and does not support illegal activities.

Global cocaine use

So, what do the data tell us about cocaine? As one of the most abused substances globally, it’s clearly a huge problem. The number of users has increased faster than population growth. 30% of use comes from the US – and although popularity had been declining for some years, it has unfortunately rebounded more recently. There are no signs a slowdown. The UN even estimates that global use could more than double, in case emerging markets like Africa or Asia would intensify their consumption to similar levels like the Europe or US.

The world’s supply of cocaine originates virtually entirely in South America. The annual manufacture is at record levels of 2000 tons, which is a dramatic uptick from 2014, when the total was less than half as big. On the positive side, interceptions by law enforcement increased faster than production, with some countries seeing 5 to 10-x higher seizures.

Use isn’t everything. The number of overdose deaths involving cocaine has skyrocketed, notably in the US. This is due to the insane increase of synthetic opioids. The light pink line, which excludes these, suggests the US cocaine market has contracted from its peak.

Some researchers have even quantitatively investigated the link of mentions in song lyrics and substance use. The logic here is pretty simple. As rappers increasingly mention baking soda or coco in their songs, they contribute to cocaine popularity and associated deaths. According to the researcher’s statistic model, there is a 2 year lag before this kicks in. At least the use in lyrics seemed to have plateaued in their data.

On a more alarming note, use of even more dangerous crack cocaine has risen in the US and Europe. Compared to powdered hydrochloride salt, this free amine base reaches the brain quicker, making it far more addictive. But what mechanisms of cocaine make it so dangerously enticing for users?

As we will discover shortly, cocaine saw historical use as a local anesthetic. Cocaine stabilizes voltage-gated sodium ion channels in an inactive state. Cells lose their ability to propagate electrical signals, including pain response. Although some FDA-approved cocaine formulations exist, the medical use of cocaine is largely obsolete.

Cocaine’s mechanism of action

What about cocaine’s psychoactive effects? It acts at the synaptic cleft in the central nervous system by blocking certain transporter proteins. These transporters usually mediate the re-uptake of neurotransmitters serotonin, dopamine and noradrenaline. Cocaine mainly prevents reuptake of these agents, causing intense and extended stimulation of the nervous system. On one hand, this overstimulation messes with the body’s reward system. As we’ve seen in our ibogaine video, many psychoactive compounds influence a myriad of targets. The same is true for cocaine. For instance, it also binds opioid receptors – if you want to learn more, check out the literature.

The dopaminergic activity of cocaine makes it addictive, and repeated exposure leads to desensitization. This means people need larger doses to induce stimuli and fend off withdrawal symptoms. This is already problematic, but cocaine and its metabolites are also toxic for many organs such as the liver, brain or kidney. In the cardiovascular system, cocaine leads to an increased heart rate and blood pressure, while decreasing the supply of oxygen to tissues. Remember the sodium channel inactivation? This can change intracardial signals within the heart leading to dysrhythmias. The list of health risks is pretty long, so I hope we all agree that this is not worth it.

Discovery of Cocaine

But since when do we even know about the molecule cocaine itself? Meet the German chemist, Albert Niemann. Like many chemists we will mention today, he is not famous but actually quite the legend. He was in great company, as he was the graduate student of Friedrich Wöhler. This is the guy who synthesized urea – in 1828 from inorganic starting materials. This was a major milestone in organic chemistry, as it dispelled the vitalistic misconception that only living organisms could produce the organic chemicals of life.

Wöhler requested Karl von Scherzer to bring him some coca leaves. This Austrian dude was pretty much living the dream of every gen Z or millennial, as a nice inheritance gave him the financial freedom to quit his printing job and start traveling around. Instead of flying to Bali, von Scherzer participated in the first large-scale scientific expedition of the Austro-Hungarian empire in 1857. Coming home with a stash of coca leaves, he imported some of them into Germany. Just in time for a nice PhD project for Niemann. Although cocaine-enriched extracts were obtained from coca leaves in 1855 already, Niemann was the first to truly isolate and characterize the primary alkaloid. He unsurprisingly gave it the name cocaine and published his research in 1860, earning him his well-deserved PhD.

Niemann was a productive, top notch researcher. In the same year, he described the synthesis of mustard gas from sulfur dichloride and ethylene. Unfortunately, this might have been a case similar to Marie Curie. Niemann correctly noted the toxic properties of this blister agent which as many of you know, saw military use during the first world war. Niemann died shortly after in 1861 due to a devastating lung infection. Maybe, the exposure to mustard gas caused this?

After Niemann’s untimely death, another colleague in Wöhler’s research group concluded his research, determining cocaine’s molecular formula. It might ring a bell for more advanced viewers: this was the guy who coined the Lossen rearrangement reaction. Only thirty years later, Richard Wilstätter determined its true structure. This gentleman is the main character of our story.

Early use of cocaine

Before we dive into the chemistry, we should note that the West rapidly embraced cocaine. Initially, it gained acclaim for its local anaesthetic properties, particularly for calming involuntary eye movements during surgery. This was a significant breakthrough! One funny article described it like this: Patients no longer merely endured nerve pain from having their eyes cut; they even chatted pleasantly during their procedures.

Cocaine also found an advocate in Sigmund Freud, the father of psychoanalysis. After using it himself as a stimulant for the smallest of problems, Freud naively recommended it as therapy for various uses, including morphine or alcohol addiction.

His personal positive experiences clearly blinded him, but pharmaceutical companies also paid him to promote their products. Over time, he could not ignore negative consequences such as addiction, leading Freud to eventually reconsider his stance.

Cocaine’s integration into society also took a significant leap with the creation of Coca-Cola in 1886. Originally formulated as a coca wine substitute, Coca-Cola contained coca leaf extract including cocaine, along with caffeine from kola nuts. Due to growing incidence of cocaine addiction, the allrounder power-drink eventually eliminated cocaine from its formula.

Cocaine synthesis: Wilstätter’s Starting Material

Let’s talk chemistry. Wilstätter didn’t just determine cocaine’s structure – he also completed the first total synthesis of cocaine. Prepare for a wild ride!

His synthesis started from cycloheptanone. But why?

Well, it conveniently brings the largest ring present in cocaine’s structure. Degradation studies by Wilstätter, which we will not show in detail, already indicated that cocaine contains a seven-membered ring. To build up the structure back up, Wilstätter had to painstakingly functionalize the ring, and create the important amine bridge.

Cocaine synthesis: Functionalizing the core

The first few steps included condensation with hydroxylamine and reduction of the resulting oxime to give the amino group. This new group was eliminated through the Hofmann protocol. It starts with exhaustive methylation to the quaternary ammonium salt, followed by elimination with silver oxide and water. Overall, these four steps gave cycloheptene.

You’re likely thinking – wait a second, why didn’t he just perform a Shapiro reaction to save some steps? Well, this reaction was only discovered in the 1960s, so Wilstätter’s armamentarium of chemical reactions was limited.

One double bond is nice, but as you will see, we actually need three of them. Bromination gave the dibromide, temporarily removing the alkene. Addition of dimethyl amine led to substitution and elimination, giving a double bond. Before you get excited, this is not yet the amine for the tropine bridge. Rather, another Hofmann elimination gave the diene. Because this was such great fun, another bromination and elimination with quinoline as a weak base gave cycloheptatriene.

Now, kinda going a step backwards, the triene was reacted with hydrogen bromide. Due to the intermediary formation of the allylic cation, this regio-isomer is preferred as opposed to the other addition product. The newly introduced bromide group was substituted with dimethyl amin. At last, this is the amine that we need in cocaine. The next step was basically why the triene approach even worked. Reduction with sodium metal in ethanol reduced just one of the double bonds, resulting in a single isomer with the surviving alkene situated on the other side of the cycloheptane. Wilstätter himself commented himself that selective reduction is strange. The last preparatory steps were a bromination of the remaining olefin to the trans-dibromide which also formed the ammonium salt. This was neutralized with sodium carbonate, regenerating the electron pair of the amine. This set up the critical step of the synthesis.

Intramolecular alkylation en route to cocaine

So, our molecule now has a potent nucleophile – the amine – as well as electrophilic carbon-bromide bonds. In the energetic ground state, the groups don’t get close so there’s no reaction. However, cooking things up in ethanol provides sufficient flexibility for the ring to distort and get the amine close enough for a transannular SN2 reaction with the anti-bromide. As we’ve explained in detail in a previous video, the reaction proceeds through back side attack and a pentacoordinate transition state. This synthesis is racemic – you can check for yourself that an inverted configuration at the amine leads to the same product as it simply kicks out the other bromide instead.

The product is obtained in roughly 30% yield and from what I could tell reading Wilstätter’s work, it looks like he actually coined the term “intramolecular alkylation”. For 21st century chemists, this reaction looks simple, but for 1901, this is really insane foresight. Having created the tropane skeleton present in cocaine, we still have to demethylate the ammonium group, and functionalize the two ring positions.

Synthesis of Tropidine and tropine

To this end, elimination of the remaining bromide gave the double bond, setting up upcoming functionalizations. Then, the ammonium ion was converted to the neutral amine. Earlier, we’ve had the protonated amine which is why base was sufficient for neutralization. However, now we are looking at a tetra-alkyl ammonium. So, chloride anion exchange and heating removed one of the methyl groups via intermolecular SN2 reaction.

How do we wrap up the synthesis? Well, instead of the alkene, we need an ester and a hydroxy group that we can benzylate. High school chemistry tells us that we can easily add water to double bonds, but in this case, a direct hydration was impossible. Instead, this conversion took two steps. First, exposure to hydrogen bromide gave the secondary bromide. Under acidic conditions, hydrolysis of the bromide gave the alcohol.

Wilstätter and Ladenburg: Two Titans Clash

This step took quite some experimentation to get right, and actually it was a source of dispute between Wilstätter and Albert Ladenburg, another German chemist. Ladenburg had claimed the direct synthesis of the alcohol under cold hydrobromination conditions more than a decade earlier. Wilstätter criticized it, claiming year-long experiments did not replicate his findings.

Very sneakily, Ladenburg updated his experimental procedures in later publications – saying they were included insignificant modifications. However, Wilstätter saw this as a copy of his own research. His procedure strictly required acidic conditions and heat. To him, Ladenburg was hoping to cover up unsuccessful, fabricated findings without drawing too much attention.

This was not the end – within the same year, Ladenburg retaliated, accusing Wilstätter of defaming him by using cheap tricks. He claimed to had repeated the synthesis, not specifying what small amounts of tropine mean, and again downplaying his modifications. I checked his OG report and while correct that he explicitly mentioned use of increased temperatures, he did not add acids or water. You would not call me crazy when I say that Wilstätter’s conditions in blue look pretty important to enable hydrolysis of the bromide.

I’m sparing you the details – but this story really shows how challenging old school chemistry was. Good luck proving that someone did or did not synthesize a structure when the characterization method was doing random characterizations of platinum salts. Basically, Ladenburg was like trust me bro, I know these platinum salts very well.

To him, this was bullet-proof evidence, and he concludes his position as arrogantly as he could. I didn’t check subsequent correspondence but a web-text on Ladenburg noted that he had quite some personal hostilities, so I’m not surprised.

My vote goes to Wilstätter. Ladenburg, again in peak 1900s style, used the low volatility of his putative tropine product as an argument to prove its identity. Turns our whatever Ladenburg had, it was not tropine, as Wilstätter showed that tropine is in fact volatile. Ladenburg hid his sneaky changes to such a degree that even a gentleman reviewing and writing about the procedure did not catch the changing method. Although you might not like Ladenburg knowing this, we have to give credit where credit is due.

He was in fact the first chemist to synthesize an alkaloid. This means he is one of the founding fathers of total synthesis. Starting from 2-methyl pyridine, he synthesized coniine – a simple but toxic alkaloid – in two steps. First, a condensation reaction delivered allyl pyridine and second, complete reduction with sodium gave the target. Given the condensation required 250 °C, you won’t be surprised that the yield was “pretty bad” as Ladenburg put it – 45g out of 1kg of educt. Just like today’s synthetic chemists struggling in total syntheses, he had to perform multiple reaction cycles by recovering unreacted starting material. Ladenburg also managed to separate the enantiomers through separation of diastereomeric tartrate salts.

Cocaine Synthesis: final Steps

Back to cocaine. The conversion of tropidine to tropine was actually the missing link. Wilstätter himself proudly concluded his report that this step completed the total synthesis of various alkaloids, including cocaine. The remaining steps were already known so the synthesis was not discovered linearly. Let’s see how we can wrap things up. Of course, the newly formed hydroxyl group could be benzylated but that wouldn’t help us with the missing ester group.

Thus, the hydroxyl group was first oxidized to the ketone which allowed alpha-functionalization. Nucleophilic addition of the enolate with CO2 creates the last important C-C bond. The addition is diastereoselective for the axial product, opposite to the rest of the tropine skeleton.

Instead of direct esterification, the ketone was reduced first. You might be surprised, wondering why the hydride now has added from the bottom face? Don’t forget the bunny ears! In the equatorial product, the hydrogen enjoys almost perfect alignment with one of the oxygen’s lone pairs, leading to a short and strong intramolecular hydrogen bond. However, the reported yield was low with no info on product ratios, so we can’t really say what was thermodynamically or kinetically favored.

The last steps were pretty simple. First, the methyl ester was completed through acidic Fischer esterification. Finally, addition of the activated reagent benzoic anhydride introduced the benzyl group, concluding the first total synthesis of cocaine. All in all, Wilstätter’s effort spanned roughly 23 steps, and the net yield must have been horrendous.

This wouldn’t be a century-old tale without the chemists trying their synthetic cocaine, noting a bitter taste and characteristic feeling on the tongue. Wilstätter elucidated and/or synthesized other important molecules, including proline and cyclooctatetraene. He received the Nobel Prize in 1915, primarily actually due to this research on the structure and function of chlorophyll.

Robinson’s Cocaine Synthesis (1917)

Wilstätter’s total synthesis was remarkable feat of skill and perseverance, with the majority of the effort focusing on the synthesis of tropinone. Unfortunately, there’s always another chemistry legend out there getting ready to ruin your career. We’re talking about Robert Robinson, well known for his own Nobel Prize and coining key chemistry concepts we still use today – such as curly arrows representing electron movement.

Robinson published research in 1917 that made Wilstätter’s signature efforts look pretty outdated. Robinson didn’t hold back, noting that the method was so complicated that he didn’t even bother to recall it in detail. His argument was that the long and low-yielding synthesis did not represent an economically workable alternative to natural sources.

Robinson’s breakthrough finding was a one-pot reaction of three components, giving tropinone in an impressive 42% yield. If haven’t seen this one before, feel free to pause the video right now, and think about a potential mechanism for this reaction.

The reaction starts off with condensation of the nucleophilic methylamine to one of the electrophilic aldehydes. After loss of water, the intermediary imine is still nucleophilic and can form a ring by a second addition – turning it into a positively charged electrophile. The enol tautomer of the acetone dicarboxylate steps in and adds to the iminium in an intermolecular Mannich reaction.

Due to the carboxylate groups, the acetone reagent functions as a di-anion equivalent. After the addition, we can have a decarboxylation of one of the groups, and reprotonation. As the nitrogen regained its electron pair after the first Mannich reaction, it can kick out the adjacent hydroxyl group, creating yet another electrophile that is ready to undergo a second, now intramolecular Mannich reaction. A second decarboxylation affords tropinone in a process that is, as we would all agree, much simpler than Wilstätter’s approach.

Noyori’s Cocaine Synthesis (1974)

Note that by the early 20th century, the use of cocaine was peaking. Newspapers were filled with ads promoting the drug, and people were using it either recreationally or ironically, to overcome morphine addiction. Thousands of deaths from cocaine abuse prompted the US to regulate the drug in 1914. This removed cocaine from over-the-counter remedies and consumer products.

How did the chemistry evolve? For the sake of science of course, many chemists tried to synthesize tropane alkaloids in a more efficient manner. One elegant approach was described by Noyori in 1974, who is well known for his discovery of asymmetric hydrogenations. This won him the Nobel Prize together with Knowles in 2003. 1974 was actually the year when Noyori and co-workers initiated the synthesis of BINAP diphosphane.

Just like Robinson, Noyori attempted to simplify the synthesis of tropinone – the intermediate that Wilstätter only accessed painfully over dozen steps. He disconnected the same bonds but instead of Mannich reactions, he employed a cycloaddition to link the ring. Don’t blink, because this one is also very short.

The reagent diiron nonacarbonyl is a reactive source of iron(0) which can reduce the tetrabromoacetone to an oxyallyl intermediate. A [4+2] cycloaddition with a pyrrole creates the tropane structure. If you’re confused by the charges, the addition does form a positive charge on the central allyl carbon but the negative charge on the oxygen regenerates the ketone. Two reductions gave tropine – first, the superfluous double bond and bromides were removed with hydrogenation, and second, the ester was reduced to the methyl group.

Why even have these extra bromo groups and ester in the first place? Well, initial attempts with dibromo acetone instead of tetrabromo acetone as a precursor did not form the oxyallyl intermediate. Similarly, the direct use of N-methyl pyrrole led to electrophilic substitution products on the pyrrole, as opposed to cycloaddition. It makes sense use of the ester deactivates the pyrrole, taming its reactivity for substitutions. Noyori nicely overcame these challenges, but just like all other syntheses, the value of this synthesis was primarily in the chemistry, rather than allowing easier access of cocaine.

Cocaine Biosynthesis

As a side note on biochemistry, the biosynthesis of cocaine only fully solved in late 2022. This research showed that the biosynthesis of tropane alkaloids from different plant orders – here in green and pink – uses unique enzyme classes but arose independently at least twice during the evolution of land plants. Similar to Robinson’s one-pot tropinone synthesis, we have an electrophilic iminium which reacts with an activated nucleophile. However, compared to Robinson’s electrophile, this iminium is not doubly activated. This means that there is no dual addition and decarboxylation. Instead, there is enzyme magic to oxidize and cyclize the tropane ring. If you are interested in biosynthetic pathways, you can check out the clever isotope-labelling experiments which elucidated some pieces of the puzzle already in the mid-20th century.

Cocaine synthesis via Engineered Tobacco?

Many organic chemists think biochemistry is boring but check this out. By understanding biosynthetic pathways, scientists have recently genetically engineered tobacco plants to produce two new enzymes in their leaves.

This is far too complex for large scale criminal synthesis of cocaine, but pretty cool. Agrobacteria can transfer and insert parts of its DNA into plant cells – giving tobacco the tools to synthesize cocaine. In a funny parallel to the chemical synthesis of cocaine, the last step is a benzoylation. Tobacco produces endogenous benzoic acid, but the plants were treated with additional benzoic acid to further double the cocaine yield – which is way higher than I would have predicted.

Congrats, you now probably know more about cocaine than everybody else you know. Thanks for following my content, and see you in the next one!

If you are interested in the synthesis of psychedelics, check out the discussion of ibogaine, psilocybin, MDMA or THC-P.

Cocaine synthesis references

– UNODC, Global report on Cocaine 2023 (United Nations publications, 2023) – Estimating the incidence of cocaine use and mortality with music lyrics about cocaine | npj Digital Medicine 2021, 4, 100
– Cocaine: An Updated Overview on Chemistry, Detection, Biokinetics, and Pharmacotoxicological Aspects including Abuse Pattern | Toxins 2022, 14, 278
– DARK Classics in Chemical Neuroscience: Cocaine | ACS Chem Neurosci 2018, 9, 2358
– Cocaine Use Disorder (CUD): Current Clinical Perspectives | Subst Abuse Rehabil. 2022; 13: 25
– Ueber die Einwirkung des braunen Chlorschwefels auf Elaylgas | Justus Liebigs Annalen 1860, 113, 288
– Synthese des Tropidins | Ber. Dtsch. Chem. Ges. 1901, 34, 129
– Ueber die Umwandlung von Tropidin in Tropin | Ber. Dtsch. Chem. Ges 1902, 35, 1870
– Umwandlung von Tropidin in Tropin | Ber. Dtsch. Chem. Ges 1902, 35, 2295
– Synthese der activen Coniine | Ber. Dtsch. Chem. Ges 1886, 19, 2578
– Richard Willstätter and the 1915 Nobel Prize in Chemistry | Angew. Chem. Int. Ed. 2015, 54, 11910
– A synthesis of tropinone | J. Chem. Soc., Trans., 1917,111, 762
– New, general synthesis of tropane alkaloids | JACS 1974, 96, 3336
– Elucidation of tropane alkaloid biosynthesis in Erythroxylum coca using a microbial pathway discovery platform | PNAS 2022, 119, e2215372119
– Discovery and Engineering of the Cocaine Biosynthetic Pathway | JACS 2022, 144, 22000 (not 21809)