Piperazine-derived diazabicycles are privileged structures found in natural products and synthetic chemical entities, including therapeutic agents. Herein, we deciphered the biosynthesis of two unique classes of diazabicyclic alkaloids, fischerazines A-C. Notably, we characterized a multifunctional P450 monooxygenase NfiC that installs ortho-dihydroxyl groups on the dibenzyl-piperazines, in turn triggering a range of NfiC-catalyzed and spontaneous cyclization events.