rethinkMushrooms Search
Menu
Guide

How Mushrooms Make Psilocybin: The Biosynthetic Pathway

Mushrooms make psilocybin from one amino acid using four enzymes. Here's how the pathway works, why only certain species can do it, and what this means for medicine.

Psilocybin Biosynthesis

4 enzymes from tryptophan to psilocybin

In 2017, scientists decoded the exact enzymatic pathway mushrooms use to make psilocybin: four enzymes, one amino acid (tryptophan), and a four-step chemical transformation that took approximately 65 million years to evolve.

Fricke, Blei & Hoffmeister, Angewandte Chemie, 2017

~65 million years

age of psilocybin biosynthesis in Psilocybe, the original lineage (Bradshaw et al., PNAS, 2024)

4-5 HGT events

how many times the gene cluster transferred horizontally to unrelated genera (Reynolds et al., 2018)

52 species

Psilocybe specimens analyzed in the largest genomic study of magic mushrooms to date

Fricke, Blei & Hoffmeister, Angewandte Chemie, 2017

Psilocybin biosynthetic pathway: four enzymes from tryptophan to psilocybinView as image ↗

Psilocybin is built from tryptophan, an amino acid that your body uses to make serotonin and that you get from food like turkey, eggs, and nuts. Mushrooms start with the same molecule and run it through four chemical transformations to produce one of the most pharmacologically active natural compounds ever studied.

Before 2017, scientists knew psilocybin existed in mushrooms but not how the mushrooms made it. The biosynthetic pathway was unknown. In 2017, Fricke, Blei, and Hoffmeister at Friedrich Schiller University in Germany solved it: four enzymes, working in sequence, turn tryptophan into psilocybin. The discovery was published in Angewandte Chemie and immediately opened the door to pharmaceutical-scale production of a compound that had been expensive and difficult to synthesize by traditional chemistry.[1]

For context on which mushroom species produce psilocybin and how potency varies between them, see the pillar article on Psilocybe cubensis: the world's most cultivated magic mushroom.

Key Takeaways

  • Psilocybin is synthesized from tryptophan using four enzymes: PsiD (decarboxylation), PsiH (hydroxylation), PsiK (phosphorylation), and PsiM (two sequential methylations); the complete pathway was characterized in 2017 from Psilocybe cubensis (Fricke et al., Angewandte Chemie, 2017)
  • The psilocybin biosynthetic gene cluster evolved in Psilocybe approximately 65 million years ago; 4-5 horizontal gene transfer events subsequently spread it to distantly related genera including Gymnopilus, Panaeolus, and Pluteus (Reynolds et al., Evolution Letters, 2018)
  • Two distinct gene cluster architectures exist within Psilocybe, corresponding to a phylogenetic split approximately 57 million years ago; this was revealed by the largest genomic analysis of the genus to date (52 specimens, 39 species) (Bradshaw et al., PNAS, 2024)
  • Baeocystin and norbaeocystin (the methylation intermediates between tryptophan and psilocybin) are genuine compounds found in mushroom tissue, not laboratory artifacts; their stability has been confirmed in Psilocybe cubensis biomass (Gotvaldová et al., 2021)
  • Understanding the four-enzyme pathway enabled production of psilocybin in microorganisms; the same genes expressed in E. coli now produce over 1 gram of psilocybin per liter of culture, solving the pharmaceutical supply problem for clinical trials

The Direct Answer: Four Enzymes, One Amino Acid

Mushrooms synthesize psilocybin from tryptophan through four enzymatic steps. Here is what each enzyme does:

PsiD (a decarboxylase) removes a carbon dioxide molecule from tryptophan. The result is tryptamine, a simpler molecule that is the structural backbone psilocybin is built on. Tryptamine is also the starting molecule for many other natural tryptamine compounds, including the neurotransmitters serotonin and melatonin.

PsiH (a hydroxylase) adds a hydroxyl group (an oxygen-hydrogen pair) to position 4 of the tryptamine ring. This creates 4-hydroxytryptamine, sometimes called 4-HT. The 4-hydroxy position is chemically important: it is present in both psilocybin and its active metabolite psilocin, and it is part of what determines how these compounds interact with serotonin receptors in the brain.

PsiK (a kinase) attaches a phosphate group to the 4-hydroxy position. This creates norbaeocystin, the first compound in the pathway with the complete psilocybin skeleton. The phosphate group makes the compound water-soluble and chemically stable. This is why psilocybin (which keeps this phosphate) is more shelf-stable than psilocin (which doesn't).

PsiM (a methyltransferase) adds methyl groups (small carbon-hydrogen units) to the nitrogen atom on the molecule, using a cofactor called SAM (S-adenosylmethionine) as the methyl donor. PsiM does this twice: the first methylation produces baeocystin, and the second methylation produces psilocybin. PsiM stops at two methylations; it cannot add a third, which would produce aeruginascin. The structural reason for this hard stop at psilocybin was only fully explained in 2024 by Hudspeth and colleagues, who determined atomic-resolution crystal structures of PsiM and showed the enzyme's binding geometry physically prevents a third SAM molecule from docking.

These four reactions run in sequence inside the mushroom cell, starting from tryptophan and ending at psilocybin. The whole pathway can be run in a laboratory reaction tube using just the purified enzymes and tryptophan.[1]

The 2017 Discovery: What Changed and Why It Mattered

Before Fricke and colleagues published their 2017 paper, psilocybin's biosynthesis was inferred from its chemical structure but not confirmed enzymatically. Researchers knew psilocybin was a phosphorylated, methylated tryptamine, but the genes responsible for the transformations and the order of the steps were unknown.

The Fricke team identified the gene cluster in Psilocybe cubensis, expressed each gene in E. coli to produce the individual enzymes, and then tested each enzyme's activity against its proposed substrate. This confirmed the sequence and allowed them to run the complete four-step synthesis in one reaction vessel.

The practical implication was immediate: if you have the four enzyme genes, you can produce psilocybin in any organism that can be engineered to express them. This opened microbial biosynthesis as an alternative to chemical synthesis or mushroom cultivation for pharmaceutical production. Within a few years, research groups had expressed the psilocybin biosynthetic genes in E. coli and yeast and achieved production yields above one gram per liter of culture fluid, a level that makes pharmaceutical-grade production feasible.

For the deeper enzymatic detail (including the specific intermediates, the rate-limiting step, and the structural reason PsiM makes exactly two methylations; see the companion article on from tryptophan to psilocybin: the enzymatic journey. For the full significance of the four enzymes and the gene cluster, see the psilocybin biosynthesis pathway: four enzymes that changed neuroscience.

Why Only Certain Mushrooms Can Make Psilocybin

The biosynthetic pathway is encoded in a set of genes that live together in the genome, which geneticists call a biosynthetic gene cluster (BGC).. The cluster includes the four enzyme-coding genes plus transporter genes (PsiT) that move the product out of the cell.

Not all mushrooms have this gene cluster. In fact, most don't. The ones that do acquired it through one of two routes: either they evolved it themselves, or they received it from another species via horizontal gene transfer.

Reynolds and colleagues published the horizontal gene transfer finding in 2018, analyzing the genomes of psilocybin-producing mushrooms from three genera: Psilocybe, Gymnopilus, and Panaeolus.[2] These genera are not closely related, about as distant on the fungal family tree as mammals and fish are on the vertebrate tree. Yet they all carry the same psilocybin biosynthetic gene cluster, and the gene sequences within the cluster are far more similar to each other than the rest of each organism's genome.

This pattern is the signature of horizontal gene transfer (HGT): genes that were transferred between organisms rather than passed down through normal parent-to-offspring inheritance. HGT is common in bacteria and has been documented in fungi for other compound biosynthesis pathways. The Reynolds team estimated 4-5 independent HGT events moved the psilocybin gene cluster from Psilocybe (the original lineage) to other genera between 40 and 9 million years ago.

Why did mushrooms evolve this pathway in the first place? Reynolds proposed an ecological fitness hypothesis: the genera that carry psilocybin genes share specific ecological niches, primarily dung and decomposing wood. These environments are also occupied by competing insects, bacteria, and other fungi. The psilocybin gene cluster may have spread because psilocybin (or a biosynthetic intermediate) acts as an insect deterrent or competitor suppressor. Mushrooms with the cluster survive better in these competitive niches; HGT spread the advantage across genera.

For the full HGT story and what it revealed about the evolutionary history of magic mushrooms, see horizontal gene transfer: how psilocybin genes jump between species.

The Bradshaw 2024 Update: Two Gene Cluster Architectures

The most current genomic analysis of psilocybin biosynthesis comes from Bradshaw, Ramírez-Cruz, and colleagues, published in PNAS in 2024.[3] The study analyzed 52 specimens representing 39 Psilocybe species, the largest genomic study of the genus ever conducted.

The finding added an unexpected layer: not all Psilocybe species have the same gene cluster architecture. Two distinct arrangements of the biosynthetic genes exist within the genus, and they correspond to a deep phylogenetic split that occurred approximately 57 million years ago. These two lineages diverged from a common ancestor that already had the psilocybin gene cluster, meaning psilocybin biosynthesis in Psilocybe is older than the split between the two lineages.

The Bradshaw 2024 study also confirmed Psilocybe as the original lineage where psilocybin first evolved, with the 4-5 downstream HGT events identified by Reynolds 2018 transferring the cluster to other genera. The phylogenomic analysis provided better resolution on the evolutionary timeline, estimating the origin of psilocybin biosynthesis in Psilocybe at approximately 65 million years ago.

For the gene cluster's structure, function, and what the two architectural variants mean for biosynthesis, see the psilocybin gene cluster: genetics of magic mushrooms.

The Pathway Intermediates: Baeocystin and Norbaeocystin

The four-step pathway from tryptophan to psilocybin produces two intermediate compounds that do not get all the way to the final product: norbaeocystin (one step before baeocystin) and baeocystin (one step before psilocybin). These are not just laboratory artifacts of the reaction sequence. They are genuine metabolites that accumulate in mushroom tissue.

Gotvaldová and colleagues confirmed this in a 2021 study that measured psilocybin and its four analogs in fresh Psilocybe cubensis biomass and tracked their stability over time.[4] Both baeocystin and norbaeocystin were present at measurable concentrations and showed characteristic stability profiles distinct from psilocybin.

This matters because baeocystin and norbaeocystin have begun appearing in discussions of the "entourage effect" in magic mushrooms, the idea that the minor tryptamine compounds might modify the psilocybin experience in ways analogous to how minor cannabinoids are thought to modify the THC experience. Whether this is pharmacologically meaningful depends on whether these compounds cross the blood-brain barrier and how they interact with serotonin receptors. The research is early, but their presence as genuine mushroom metabolites makes the hypothesis worth taking seriously. For more on aeruginascin, the trimethylated compound that PsiM cannot make, see aeruginascin: the compound that may make some mushrooms "friendlier".

What This Pathway Means for Medicine

The 2017 Fricke discovery had an immediate practical consequence: it made pharmaceutical-scale production of psilocybin feasible without relying on mushroom cultivation.

Traditional chemical synthesis of psilocybin is technically possible but expensive, produces racemic mixtures requiring purification, and generates chemical waste. Mushroom cultivation produces psilocybin at inconsistent concentrations across batches and requires significant handling infrastructure. Neither approach scales easily to the quantities needed for large clinical trials.

The enzymatic pathway changes this calculation. The four biosynthetic genes can be inserted into fast-growing microorganisms like E. coli and Saccharomyces cerevisiae (baker's yeast). These microorganisms, given tryptophan and the right growth conditions, produce psilocybin according to the same enzymatic logic the mushrooms use. Research groups have achieved production titers above 1 gram per liter of culture fluid using this approach.

This biotechnological production route is what enables the current clinical trial pipeline. COMPASS Pathways, USONA Institute, and other sponsors of late-stage psilocybin clinical trials use pharmaceutical-grade psilocybin produced this way, not extracted from mushrooms. The supply chain for psilocybin as a regulated medicine runs directly through the understanding of the biosynthetic pathway.

Understanding the pathway also enables design of next-generation compounds. If you know exactly how PsiM methylates, you can design variants that stop at baeocystin rather than psilocybin. If you know PsiH's substrate flexibility, you can explore 4-hydroxy substitutions that shift receptor selectivity. The biosynthetic pathway is not just a fact about mushrooms. It is the blueprint for a new class of tryptamine pharmaceuticals.

The Bottom Line

Psilocybe mushrooms synthesize psilocybin from tryptophan using four enzymes: PsiD (decarboxylation), PsiH (hydroxylation), PsiK (phosphorylation), and PsiM (double N-methylation). The pathway was fully characterized in 2017. The biosynthetic gene cluster evolved in Psilocybe approximately 65 million years ago and spread to other genera via 4-5 horizontal gene transfer events, explaining why unrelated species independently produce the same compound. Two distinct gene cluster architectures within Psilocybe correspond to a 57-million-year phylogenetic split. The pathway intermediates baeocystin and norbaeocystin are genuine mushroom metabolites. The enzymatic pathway discovery enabled microbial biosynthesis at pharmaceutical scale, which supplies psilocybin for ongoing clinical trials.

Frequently Asked Questions

Sources & References

  1. 1. Source details for this reference are not yet available.
  2. 2. Source details for this reference are not yet available.
  3. 3. Source details for this reference are not yet available.
  4. 4. Source details for this reference are not yet available.