Enynes are an important functionality in organic chemistry. 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. Here, we identify the biosynthetic gene cluster and characterize two crucial enzymes in the biosynthesis of 1. We discovered a P450 monooxygenase that has a dual function to first catalyze dehydrogenation of the prenyl chain to generate a cis-diene intermediate and then shows acetylenase activity to yield an alkyne moiety, giving the 1,3-enyne. We also characterized a UbiA prenyltransferase, which is unusual in that it favors transferring a five-carbon prenyl chain, rather than a polyprenyl chain, to a p -hydroxybenzoic acid acceptor.