As dimeric natural products frequently exhibit useful biological activities, identifying and understanding their mechanisms of dimerization is of great interest. One such compound is (−)-ditryptophenaline, isolated from Aspergillus flavus, which inhibits substance P receptor for potential analgesic and anti-inflammatory activity. Through targeted gene knockout in A. flavus and heterologous yeast gene expression, we determined for the first time the gene cluster and pathway for the biosynthesis of a dimeric diketopiperazine alkaloid. We also determined that a single cytochrome P450, DtpC, is responsible not only for pyrroloindole ring formation but also for concurrent dimerization of N-methylphenylalanyltryptophanyl diketopiperazine monomers into a homodimeric product. Furthermore, DtpC exhibits relaxed substrate specificity, allowing the formation of two new dimeric compounds from a non-native monomeric precursor, brevianamide F. A radical-mediated mechanism of dimerization is proposed.