The dimeric diketopiperazine (DKPs) alkaloids are a diverse family of natural products (NPs) whose unique structural architectures and biological activities have inspired the development of new synthetic methodologies to access these molecules. However, catalyst-controlled methods that enable the selective formation of constitutional and stereoisomeric dimers from a single monomer are lacking. To resolve this long-standing synthetic challenge, we sought to characterize the biosynthetic enzymes that assemble these NPs for application in biocatalytic syntheses. Genome mining enabled identification of the cytochrome P450, NzeB (Streptomyces sp. NRRL F-5053), which catalyzes both intermolecular carbon-carbon (C-C) and carbon-nitrogen (C-N) bond formation. To identify the molecular basis for the flexible site-selectivity, stereoselectivity, and chemoselectivity of NzeB, we obtained high-resolution crystal structures (1.5 Å) of the protein in complex with native and non-native substrates. This, to our knowledge, represents the first crystal structure of an oxidase catalyzing direct, intermolecular C-H amination. Site-directed mutagenesis was utilized to assess the role individual active-site residues play in guiding selective DKP dimerization. Finally, computational approaches were employed to evaluate plausible mechanisms regarding NzeB function and its ability to catalyze both C-C and C-N bond formation. These results provide a structural and computational rationale for the catalytic versatility of NzeB, as well as new insights into variables that control selectivity of CYP450 diketopiperazine dimerases.