The 1,3-enyne moiety is commonly found in cyclohexanoid natural products produced by endophytic and plant pathogenic fungi. Asperpentyn (1) is a 1,3-enyne-containing cyclohexanoid terpenoid isolated from Aspergillus and Pestalotiopsis. The genetic basis and biochemical mechanism of 1,3-enyne biosynthesis in 1, and other natural products containing this motif, has remained enigmatic despite their potential ecological roles. Identified here is the biosynthetic gene cluster and characterization of two crucial enzymes in the biosynthesis of 1. A P450 monooxygenase that has a dual function, to first catalyze dehydrogenation of the prenyl chain to generate a cis-diene intermediate and then serve as an acetylenase to yield an alkyne moiety, and thus the 1,3-enyne, was discovered. A UbiA prenyltransferase was also characterized and it is unusual in that it favors transferring a five-carbon prenyl chain, rather than a polyprenyl chain, to a p-hydroxybenzoic acid acceptor.