Entomopathogenic fungi routinely kill their hosts before releasing infectious spores, but a few species keep insects alive while sporulating, which enhances dispersal. Transcriptomics- and metabolomics-based studies of entomopathogens with post-mortem dissemination from their parasitized hosts have unraveled infection processes and host responses. However, the mechanisms underlying active spore transmission by Entomophthoralean fungi in living insects remain elusive. Here we report the discovery, through metabolomics, of the plant-associated amphetamine, cathinone, in four Massospora cicadina-infected periodical cicada populations, and the mushroom-associated tryptamine, psilocybin, in annual cicadas infected with Massospora platypediae or Massospora levispora, which likely represent a single fungal species. The absence of some fungal enzymes necessary for cathinone and psilocybin biosynthesis along with the inability to detect intermediate metabolites or gene orthologs are consistent with possibly novel biosynthesis pathways in Massospora. The neurogenic activities of these compounds suggest the extended phenotype of Massospora that modifies cicada behavior to maximize dissemination is chemically-induced.