Epoxy-janthitrems are a class of indole diterpenes with structural similarity to lolitrem B. Two taxa of asexual Epichloë endophytes have been reported to produce epoxy-janthitrems, LpTG-3 (Lolium perenne Taxonomic Group 3; e.g., NEA12) and LpTG-4 (e.g., E1). Epichloë epoxy-janthitrems are not well understood, the biosynthetic pathway and associated gene complement have not been described and while the literature suggests they are associated with superior protection against pasture insect pests and are tremorgenic in grazing mammals, these properties have not been confirmed using isolated and purified compounds. Whole genome sequence analysis was used to identify candidate genes for epoxy-janthitrem biosynthesis that are unique to epoxy-janthitrem producing strains of Epichloë. A gene, jtmD, was identified with homology to aromatic prenyl transferases involved in synthesis of indole diterpenes. The location of the epoxy-janthitrem biosynthesis gene cluster (JTM locus) was determined in the assembled nuclear genomes of NEA12 and E1. The JTM locus contains cluster 1 and cluster 2 of the lolitrem B biosynthesis gene cluster (LTM locus), as well as four genes jtmD, jtmO, jtm01, and jtm02 that are unique to Epichloë spp. that produce epoxy-janthitrems. Expression of each of the genes identified was confirmed using transcriptome analysis of perennial ryegrass-NEA12 and perennial ryegrass-E1 symbiota. Sequence analysis confirmed the genes are functionally similar to those involved in biosynthesis of related indole diterpene compounds. RNAi silencing of jtmD and in planta assessment in host-endophyte associations confirms the role of jtmD in epoxy-janthitrem production. Using LCMS/MS technologies, a biosynthetic pathway for the production of epoxy-janthitrems I–IV in Epichloë endophytes is proposed.