Caffeine was named in 1819 and explained in 1981
Unrelated plants invented the same molecule at least six times, by different routes, for reasons that have nothing to do with us. We drank them for centuries, gave the compound four names before realising it was one, learned to build it from scratch, and only then worked out what it actually does.

On 3 October 1819, a young chemist walked into Goethe's house in Jena carrying a cat. He was there to demonstrate that an extract of belladonna would blow the animal's pupils wide open, which it did. His nickname in Jena was Dr. Gift, the poison doctor, and he was proud of it. On the way out, Goethe handed him a box of coffee beans and suggested he might look for whatever it was in them that was keeping him awake at night. Then, as Friedlieb Ferdinand Runge told the story decades later, he got to the door having forgotten the cat, and Goethe called after him that he had left his assistant behind. 1
Runge found it. He did not call it caffeine. He called it the Kaffeebase, the coffee base, and published it that same year. 1 What nobody involved could have guessed is that it would be another century and a half before anyone could say what the substance in that box actually did.
Six plants, six separate inventions
Start with the thing that should be strange and usually isn't. Coffee is a Rubiaceae, in the same order as gardenias. Tea is a Theaceae. Cacao and kola are Malvaceae, cousins of okra and cotton. Guarana is a Sapindaceae, related to lychee. Yerba mate and yaupon holly are Aquifoliaceae. Citrus is a Rutaceae. These plants are not close relatives. They sit in six families across six orders, on both sides of the deepest split in the flowering plants.
And they all make the identical molecule. Not similar molecules, the same one: C₈H₁₀N₄O₂, down to the last atom. For a long time the obvious inference was a shared inheritance, some ancestral caffeine machinery passed down and lost by everyone else. That turns out to be wrong, and the paper that showed it is one of the more satisfying pieces of work in plant chemistry.
A team at Western Michigan University compared the enzymes across five lineages and found something better than shared ancestry. In their own words, even though the caffeine molecule is identical in the cacao, citrus, guarana, coffee and tea lineages, it is produced by different, previously unknown, biosynthetic pathways. 12 Coffee and tea build it from xanthosine. Cacao, guarana and yerba mate build it from xanthine, skipping an intermediate entirely. Two routes, different substrates, same destination.
They went further and resurrected the extinct ancestral enzymes in the lab to see where the parts came from. The answer is that nothing was invented from nothing. The enzymes had been sitting in these lineages for over a hundred million years doing other jobs, and were co-opted, in some cases needing very few mutations to start making caffeine. 12 The 2025 yerba mate genome puts the current count at no less than six independent origins, and notes that all these caffeine-making lineages arose only within the last ten to twenty million years. 13 Ancient tools, recent product, six unrelated plants reaching into the same drawer.
Which disposes of a piece of packaging language you have certainly met. Theine, guaranine and mateine are marketed as gentler or slower relatives of caffeine. They are not relatives. The US National Institutes of Health indexes theine, guaranine and mateina as synonyms of a single entry, compound 2519, caffeine. 14 The molecule is the same; what differs is the dose and everything else in the cup. The marketing has it exactly backwards: it claims the molecules differ and the plants are alike, when the truth is that the molecule is identical and the plants' machinery is not.
What the plant is actually doing with it
None of this was built for us. In 1984 James Nathanson fed tobacco hornworm larvae an artificial diet dosed with powdered tea leaf or coffee bean and watched them stop eating, tremble, and die. The line that matters is his conclusion that the concentrations of caffeine found naturally in undried tea leaves, 0.68 to 2.1 per cent, or coffee beans, 0.8 to 1.8 per cent, were sufficient to kill most of the larvae. 15 The plant is not making a mild dose of something. At its own natural concentration, a tea leaf is an insecticide.
Be careful with how far that goes. The coffee berry borer, the insect whose entire livelihood is eating coffee beans, shows no relationship between how much caffeine a coffee species carries and how well it resists the beetle. 18 The defence works on most things, and the specialist that matters most has simply got past it.
Then there is the other use, which is stranger. In 2013 a group led by Geraldine Wright measured caffeine in the floral nectar of coffee and citrus and found it at 0.003 to 0.253 millimolar, a rounding error next to the leaves. They fed bees sugar water at those levels and tested what the bees remembered. Three times as many recalled the scent that had predicted a reward a full day later, and twice as many at three days. 16 The mechanism is the one you are about to read about in humans: caffeine potentiated the bee's memory neurons by blocking its adenosine receptors.
The dosing is the elegant part. Bees can taste caffeine, and are put off by it above one millimolar. Nectar never reached 0.3. Meanwhile the same plants run caffeine in leaves and seeds at up to 24 milligrams per millilitre, against 0.058 in the nectar. 16 Poison in the leaf, a memory drug in the flower, four hundred times apart, one molecule. The authors' conclusion is that pollinators drive selection toward concentrations that are not repellent but still pharmacologically active.
It gets less charming. A 2015 study put field-realistic caffeine in forage and watched what colonies did. Bees foraged more, danced more, recruited more, and colony-level recruitment quadrupled, on a food source that had not improved at all. The authors concluded that caffeine causes bees to overestimate forage quality, making the relationship less mutualistic and more exploitative. 17 The plant is not rewarding the pollinator's memory. It is drugging its customer into loyalty.
Drunk for centuries by people who had no idea
Humans arrived at these plants entirely independently, and with the same intent every time. Ralph Hattox's history of coffee's origins places the drink among Sufi orders in Yemen in the first or second quarter of the fifteenth century, its adoption often attributed to a scholar and Sufi of Aden, al-Dhabhani, who died around 1470. The oldest surviving narrative says it plainly: the drink had spread in the Yemen and was being used by Sufi shaykhs and others to help them stay awake during their devotional exercises. 2 Note what that is. It is not a beverage that happened to be stimulating. It was adopted for the effect, six hundred years ago, by people with no concept of an alkaloid.
It caused trouble immediately. On the night of 20 June 1511 the Mamluk official Kha'ir Beg, walking home from prayers in Mecca, came upon men with lanterns in a precinct of the Sacred Mosque swallowing something in the manner of drinkers taking an intoxicant. He broke up the gathering and convened the jurists the next morning. 2 The first documented attempt to ban coffee is older than the first attempt to explain it by four centuries.
Tea is older and better attested physically. The first unambiguous text describing tea as a drink dates to 59 BCE, and in 2016 a team analysing plant remains from the tomb complex of the Han emperor Jing, who died in 141 BCE, identified tea by three independent markers: theanine, calcium phytoliths, and caffeine itself. 3 The sample dated to roughly 2,100 years ago, and the same study found tea at a cemetery in western Tibet by the second or third century CE, pushing the physical record back by about a thousand years.
My favourite of these is North American. Chemical analysis of pottery beakers from Cahokia, the great Mississippian city near modern St. Louis, found theobromine, caffeine and ursolic acid, the signature of holly, in vessels dated between 1050 and 1250 CE. 4 Cahokia sits far north of where the relevant holly grows. Somebody was carrying yaupon leaves hundreds of miles up the continent so that a caffeinated drink could be consumed ritually in a city that would not learn the word caffeine for another eight centuries.
The stories we tell about all this are mostly invented. The goatherd who noticed his animals dancing after eating the berries is a European tale, absent from the Arabic writers who actually documented coffee's spread, and it was already being denounced as unhistorical in 1699 by Antoine Galland, who had translated the Arabic sources and noticed the Christianised retelling had simply swapped an abbot in for a shaykh. 2 The animal is a shepherd's sheep in some tellings and a goatherd's goats in others, which is roughly what you would expect from folklore and not at all what you would expect from a record.
Named, synthesised, and still unexplained
The nineteenth century took the molecule apart with impressive speed and got the identity question badly muddled on the way. Coffee's alkaloid was Runge's Kaffeebase in 1819. Guarana's was named guaranin in 1826. Tea's was named theine in 1827. For eleven years, tea was understood to contain a stimulant of its own. Then in 1838, two chemists in two countries independently demolished it, one of them under a title that leaves nothing to interpretation: Thein identisch mit Caffein, theine identical with caffeine. 5 A Dutch paper the same year reached the same conclusion. 6 Guaranine followed into the same grave in 1840. 7 Every one of those trade names outlived its own refutation by nearly two centuries and is still on sale.
Emil Fischer synthesised caffeine outright in 1895, building it up from uric acid. 8 In 1902 he took the Nobel Prize in Chemistry, and it is worth being precise about what for: the citation reads for his work on sugar and purine syntheses, and does not mention caffeine at all. Caffeine is simply one purine among the several he had conquered. His Nobel lecture is where he lets himself enjoy it.
With the exercise of a little imagination the day can be foreseen when beans will no longer be required to make good coffee: a small amount of powder from a chemical works together with water will provide a savoury, refreshing drink surprisingly cheaply.
He also anticipated the objection, noting drily that the layman's scepticism would not be helped by learning that a constituent of guano would be used to prepare the synthetic drink. 9 In the same lecture he calls caffeine the pleasant stimulating principle of coffee and tea, and the most active constituent of the two most widespread stimulants. He knew what it was for. He could name it, draw it, and make it from scratch. He had no idea whatsoever how it worked.
1981
The answer came from a direction nobody was looking. In 1970 it was noticed that adenosine raises cyclic AMP in brain tissue and that methylxanthines block it. In 1981, Solomon Snyder's group at Johns Hopkins ran the test that turned that into an explanation, and its design is worth admiring. They took ten different methylxanthines, ranked them by how tightly each bound the adenosine receptor, ranked them separately by how much each stimulated a mouse, and compared the two lists. They matched. 10
They then closed the obvious escape route. The rival explanation of the day involved benzodiazepine receptors, and the concentrations needed to touch those were far higher than anything achieved at behaviourally active doses, and did not track potency at all. Their conclusion was that the behavioral stimulant effects of methylxanthines involve a blockade of central adenosine receptors. 10 Bertil Fredholm later compressed the whole case into a single sentence.
Of the known biochemical actions of caffeine, only inhibition of adenosine receptors occurs at concentrations achieved during normal human consumption of the drug.
Caffeine does other things in a test tube. At the concentrations you get from drinking anything, it does one. 11 And what it does is not what the word stimulant implies. Adenosine accumulates in the brain across a long waking day and, docking at its receptors, quiets neurons down and reports that you have been up a while. Caffeine is the wrong shape in the right way: it occupies the parking space without doing the job. Nothing is added to your energy budget. A message is intercepted.
Count the gap. Named in 1819, explained in 1981. One hundred and sixty-two years, during which the compound was isolated, named four times, argued about, given a formula, synthesised from uric acid, awarded a Nobel Prize, and consumed by most of the planet daily. Knowing what a thing is and knowing what it does turn out to be very different projects.
What it does to you, honestly
The numbers first. Europe's food safety authority reviewed the evidence in 2015 and concluded that single doses up to 200 mg, and habitual intake up to 400 mg a day, do not raise safety concerns for non-pregnant adults, with 200 mg a day the figure in pregnancy. 21 For children it said something more honest than most people quote: the information available is insufficient to derive a safe caffeine intake, and the adult figure of 3 mg per kilogram may serve as a basis for deriving one. That widely-cited paediatric limit is a borrowed adult number, not a paediatric finding.
For scale, from USDA's own measurements: brewed coffee runs about 95 mg in an eight-ounce cup and black tea about 47. Espresso is five times more concentrated than drip, at 212 mg per 100 g against 40, and yet a single shot delivers around 63 mg, less than the mug. 20 Concentration and dose are not the same thing, which is a useful sentence to keep in your pocket.
Now the uncomfortable part, and it is the best-argued question in the field. A 2010 trial with 379 people, properly randomised and double-blind with parallel groups, found that caffeine did not increase alertness in participants who were not habitual consumers, while placebo in the habitual group made them less alert and gave them headaches. Its conclusion was that no net benefit for alertness is gained, as caffeine abstinence reduces alertness and consumption merely returns it to baseline. 22 If that is right, the morning cup is not lifting you. It is repairing the damage done by yesterday's.
It is not settled. A 2005 crossover study using 75 and 150 mg doses found real gains in reaction time, vigilance and working memory in 24 habitual non-consumers, people with no withdrawal to reverse. 23 So the honest summary is narrower than either camp's headline: for the habitual daily drinker, a good deal of well-controlled work suggests the lift is mostly restoration, and whether caffeine can push a genuinely naive person above their own baseline remains contested, with decent trials on both sides.
Two harms are not contested at all. The first is sleep. A double-blind crossover gave 400 mg at bedtime, three hours before bed, and six hours before bed, and measured what happened with a sleep monitor rather than a questionnaire. All three timings significantly disturbed sleep, and the six-hour dose cost about as much total sleep time as the one taken at bedtime, roughly an hour. 24 It was a small study, twelve people, but it is the kind of result that survives its sample size because the effect is so blunt. An afternoon coffee is a decision about tonight.
The second is withdrawal, which is a real clinical syndrome and not a figure of speech. The definitive review pooled 57 experimental studies and validated ten symptoms, headache chief among them at an incidence of 50 per cent, with 13 per cent of people reporting clinically significant distress or functional impairment. Onset is 12 to 24 hours in, peaks at 20 to 51 hours, and runs 2 to 9 days. The detail that surprises everyone is the threshold: abstinence from doses as low as 100 mg a day produced symptoms. 25 That is one modest mug. Caffeine withdrawal is a diagnosis in the DSM-5. Caffeine use disorder, for the record, is not; it sits in the section reserved for conditions needing further study.
The benefit that keeps failing to show up
You have read that coffee is good for you. The source is usually a 2017 umbrella review in the BMJ covering 201 meta-analyses and 67 health outcomes, which found that three to four cups a day tracked with lower all-cause mortality, relative risk 0.83, lower cardiovascular mortality and lower cardiovascular disease. 26 It is a serious piece of work and its authors were careful, warning about smoking as a confounder and noting that even prospective cohorts can suffer reverse causation, where people cut back on coffee because of the early symptoms of a disease they do not yet know they have. They closed by calling for randomised trials.
Two months later the BMJ published a correction, and it is instructive. Several numbers were wrong. The headline finding that any coffee at all protected against liver cirrhosis, relative risk 0.61, was corrected to 0.89 with a confidence interval crossing one, which is to say it became a null result and was dropped from the paper's top ten. 27 The corrected paper is still positive overall. But the single most quoted liver claim in coffee writing was retracted in place, quietly, and almost nobody noticed.
Then there is the harder test. Mendelian randomisation uses inherited variants in caffeine metabolism as a natural experiment, which sidesteps the confounding that plagues asking people what they drink. A 2025 systematic review pooled 59 such studies across 160 disease associations. It found genetic support for a few things, notably lower migraine risk. It did not find support for effects on all-cause mortality, cardiovascular disease, Parkinson's disease or depression, and it concluded that the phenotypic associations reported for coffee are likely to be due to residual confounding or reverse causality, and not through a causal pathway. 28
The defensible version is therefore not the one on the mug. People who drink three or four cups a day do die less often, and when geneticists go looking for the causal arrow behind that, they mostly cannot find it. Coffee drinking may be a marker of being well enough to have a routine at least as much as it is a cause of anything. That is a duller sentence and a truer one.
Acute danger is real but oddly shaped. Serious toxicity begins around 1.2 g taken quickly, and a review of 92 fatal cases put lethal blood concentrations at 80 to 100 mg per litre against 3 to 6 in normal consumption. 29 You cannot practically get there with brewed coffee: it would be fifty-odd mugs, drunk faster than a five-hour half-life can clear them. Essentially every caffeine death involves a concentrated form, powder or pills or a deliberate overdose. The hazard is not the molecule, it is the format, and specifically what happens when you take the water away.
The coffee that forgot
There is a wild coffee on the Comoro islands, Coffea humblotiana, that makes no caffeine at all. Its genome was sequenced in 2021 and the reason turns out to be beautifully simple: the gene for the last enzyme in the chain, the one that converts theobromine into caffeine, is missing. The plant builds the molecule almost all the way and then stops, one methyl group short. 19 Fewer than 110 of these trees are left alive on Mayotte. The paper notes in passing that caffeine-free is the normal condition across most wild coffees of Madagascar and the Mascarenes. The species we drink is the odd one.
Which is a good place to leave it. The molecule in your cup is a defence compound, evolved at least six separate times by plants that are not related to each other, deployed at killing strength in the leaf and at flirting strength in the flower, aimed at insects and never at us. We found it anyway, in Yemen and in Sichuan and on the Mississippi, entirely independently, and all for the same reason, which was to stay awake for something that mattered. Goethe wanted to know what was keeping him up. It took a hundred and sixty-two years to answer him properly, and the answer is that nothing was being added at all. A message was simply not getting through.
Sources
Every numbered claim above points here. Links go to the paper, record, or authority itself.
- 1.
Maar JH. Friedlieb Ferdinand Runge (1794-1867), An Unusual Chemist. Substantia. 2025;9(1):73-87.
https://doi.org/10.36253/Substantia-2810 - 2.
Hattox RS. Coffee and Coffeehouses: The Origins of a Social Beverage in the Medieval Near East. Seattle: University of Washington Press; 1985.
https://uwapress.uw.edu/book/9780295962313/coffee-and-coffeehouses/ - 3.
Lu H, Zhang J, Yang Y, et al. Earliest tea as evidence for one branch of the Silk Road across the Tibetan Plateau. Scientific Reports. 2016;6:18955.
https://doi.org/10.1038/srep18955 - 4.
Crown PL, Emerson TE, Gu J, Hurst WJ, Pauketat TR, Ward T. Ritual Black Drink consumption at Cahokia. PNAS. 2012;109(35):13944-13949.
https://doi.org/10.1073/pnas.1208404109 - 5.
Jobst C. Thein identisch mit Caffein. Annalen der Pharmacie. 1838;25(1):63-66.
https://doi.org/10.1002/jlac.18380250106 - 6.
Mulder GJ. Ueber Theïn und Caffeïn. Journal für Praktische Chemie. 1838;15(1):280-284.
https://doi.org/10.1002/prac.18380150124 - 7.
Martius T. Ueber die Zusammensetzung des Guaranins. Justus Liebigs Annalen der Chemie. 1840;36(1):93-95.
https://doi.org/10.1002/jlac.18400360110 - 8.
Fischer E, Ach L. Synthese des Caffeïns. Berichte der deutschen chemischen Gesellschaft. 1895;28(3):3135-3143.
https://doi.org/10.1002/cber.189502803156 - 9.
Fischer E. Syntheses in the Purine and Sugar Group. Nobel Lecture, 12 December 1902. In: Nobel Lectures, Chemistry 1901-1921. Amsterdam: Elsevier; 1966.
https://www.nobelprize.org/prizes/chemistry/1902/fischer/lecture/ - 10.
Snyder SH, Katims JJ, Annau Z, Bruns RF, Daly JW. Adenosine receptors and behavioral actions of methylxanthines. PNAS. 1981;78(5):3260-3264.
https://doi.org/10.1073/pnas.78.5.3260 - 11.
Fredholm BB. Astra Award Lecture. Adenosine, adenosine receptors and the actions of caffeine. Pharmacology and Toxicology. 1995;76(2):93-101.
https://doi.org/10.1111/j.1600-0773.1995.tb00111.x - 12.
Huang R, O'Donnell AJ, Barboline JJ, Barkman TJ. Convergent evolution of caffeine in plants by co-option of exapted ancestral enzymes. PNAS. 2016;113(38):10613-10618.
https://doi.org/10.1073/pnas.1602575113 - 13.
Vignale FA, Hernandez Garcia A, Modenutti CP, et al. Yerba mate (Ilex paraguariensis) genome provides new insights into convergent evolution of caffeine biosynthesis. eLife. 2025;14:e104759.
https://doi.org/10.7554/eLife.104759 - 14.
PubChem Compound Summary CID 2519, Caffeine. National Center for Biotechnology Information.
https://pubchem.ncbi.nlm.nih.gov/compound/2519 - 15.
Nathanson JA. Caffeine and Related Methylxanthines: Possible Naturally Occurring Pesticides. Science. 1984;226(4671):184-187.
https://doi.org/10.1126/science.6207592 - 16.
Wright GA, Baker DD, Palmer MJ, et al. Caffeine in Floral Nectar Enhances a Pollinator's Memory of Reward. Science. 2013;339(6124):1202-1204.
https://doi.org/10.1126/science.1228806 - 17.
Couvillon MJ, Al Toufailia H, Butterfield TM, Schrell F, Ratnieks FLW, Schürch R. Caffeinated Forage Tricks Honeybees into Increasing Foraging and Recruitment Behaviors. Current Biology. 2015;25(21):2815-2818.
https://doi.org/10.1016/j.cub.2015.08.052 - 18.
Ashihara H, Sano H, Crozier A. Caffeine and related purine alkaloids: Biosynthesis, catabolism, function and genetic engineering. Phytochemistry. 2008;69(4):841-856.
https://doi.org/10.1016/j.phytochem.2007.10.029 - 19.
Raharimalala N, Rombauts S, McCarthy A, et al. The absence of the caffeine synthase gene is involved in the naturally decaffeinated status of Coffea humblotiana, a wild species from Comoro archipelago. Scientific Reports. 2021;11:8119.
https://doi.org/10.1038/s41598-021-87419-0 - 20.
USDA FoodData Central, SR Legacy. U.S. Department of Agriculture, Agricultural Research Service; 2019.
https://fdc.nal.usda.gov/ - 21.
EFSA Panel on Dietetic Products, Nutrition and Allergies. Scientific Opinion on the safety of caffeine. EFSA Journal. 2015;13(5):4102.
https://doi.org/10.2903/j.efsa.2015.4102 - 22.
Rogers PJ, Hohoff C, Heatherley SV, et al. Association of the anxiogenic and alerting effects of caffeine with ADORA2A and ADORA1 polymorphisms and habitual level of caffeine consumption. Neuropsychopharmacology. 2010;35(9):1973-1983.
https://doi.org/10.1038/npp.2010.71 - 23.
Haskell CF, Kennedy DO, Wesnes KA, Scholey AB. Cognitive and mood improvements of caffeine in habitual consumers and habitual non-consumers of caffeine. Psychopharmacology. 2005;179(4):813-825.
https://doi.org/10.1007/s00213-004-2104-3 - 24.
Drake C, Roehrs T, Shambroom J, Roth T. Caffeine effects on sleep taken 0, 3, or 6 hours before going to bed. Journal of Clinical Sleep Medicine. 2013;9(11):1195-1200.
https://doi.org/10.5664/jcsm.3170 - 25.
Juliano LM, Griffiths RR. A critical review of caffeine withdrawal: empirical validation of symptoms and signs, incidence, severity, and associated features. Psychopharmacology. 2004;176(1):1-29.
https://doi.org/10.1007/s00213-004-2000-x - 26.
Poole R, Kennedy OJ, Roderick P, Fallowfield JA, Hayes PC, Parkes J. Coffee consumption and health: umbrella review of meta-analyses of multiple health outcomes. BMJ. 2017;359:j5024.
https://doi.org/10.1136/bmj.j5024 - 27.
Correction: Coffee consumption and health: umbrella review of meta-analyses of multiple health outcomes. BMJ. 2018;360:k194.
https://doi.org/10.1136/bmj.k194 - 28.
Pham K, Kassaw NA, Mulugeta A, Zhou A, Hyppönen E. Coffee and health outcomes: a systematic review of Mendelian randomisation studies. Nutrition Research Reviews. 2025;38(2):1006-1026.
https://doi.org/10.1017/S0954422425100206 - 29.
Cappelletti S, Piacentino D, Fineschi V, Frati P, Cipolloni L, Aromatario M. Caffeine-Related Deaths: Manner of Deaths and Categories at Risk. Nutrients. 2018;10(5):611.
https://doi.org/10.3390/nu10050611