Ergot alkaloids, secondary metabolites produced by filamentous fungi, elicit a diverse array of pharmacological effects. The biosynthesis of this class of natural products has not been fully elucidated. Here we demonstrate that a homologue of Old Yellow Enzyme encoded in the Aspergillus fumigatus ergot gene cluster catalyzes reduction of the alpha,beta unsaturated alkene of chanoclavine-I aldehyde 3. This reduction, which yields dihydrochanoclavine aldehyde, facilitates an intramolecular reaction between a secondary amine and aldehyde to form the D ring of the ergot alkaloid structural framework.