1-Benzazepine is a pharmaceutically important scaffold but is rare among natural products. Nanangelenin A (1), containing an unprecedented 3,4-dihydro-1-benzazepine-2,5-dione-N-prenyl-N-acetoxy-anthranilamide scaffold, was isolated from a novel species of Australian fungus, Aspergillus nanangensis. Genomic and retrobiosynthetic analyses identified a putative nonribosomal peptide synthetase (NRPS) gene cluster (nan). The detailed biosynthetic pathway to 1 was established by heterologous pathway reconstitution in A. nidulans, which led to biosynthesis of intermediates nanagelenin B-F (2-5 and 7). We demonstrated that the NRPS NanA incorporates anthranilic acid (Ant) and l-kynurenine (l-Kyn), which is supplied by a dedicated indoleamine-2,3-dioxygenase NanC encoded in the gene cluster. Using heterologous in vivo assays and mutagenesis, we demonstrated that the C-terminal condensation (CT) and thiolation (T3) domains of NanA are responsible for the regioselective cyclization of the tethered Ant-l-Kyn dipeptide to form the unusual benzazepine scaffold in 1. We also showed that NanA-CT catalyzes the regioselective cyclization of a surrogate synthetic substrate, Ant-l-Kyn-N-acetylcysteamine, to give the benzazepine scaffold, while spontaneous cyclization of the dipeptide yielded the alternative kinetically favored benzodiazepine scaffold. The discovery of 1 and the characterization of NanA have expanded the chemical and functional diversities of fungal NRPSs.