Fungal bicyclo[2.2.2]diazaoctane indole alkaloids demonstrate intriguing structures and a wide spectrum of biological activities. Although biomimetic total syntheses have been completed for representative compounds of this structural family, the details of their biogenesis have remained largely uncharacterized. Among them, Brevianamide A represents the most basic form within this class bearing a dioxopiperazine core structure and a rare 3-spiro-psi-indoxyl skeleton. Here, we identified the Brevianamide A biosynthetic gene cluster from Penicillium brevicompacticum NRRL 864 and fully elucidated the metabolic pathway by targeted gene disruption, heterologous expression, precursor incorporation studies, and in vitro biochemical analysis. In particular, we determined that BvnE is a cofactor-independent isomerase that is essential for selective production of Brevianamide A. Based on a high resolution crystal structure of BvnE, molecular modeling, mutational analysis, and computational studies provided new mechanistic insights into the diastereoselective formation of the 3-spiro-psi-indoxyl moiety in Brevianamide A. This occurs through a biocatalyst controlled semi-Pinacol rearrangement and a subsequent spontaneous intramolecular [4+2] hetero-Diels-Alder cycloaddition.