Redox enzymes play a critical role in transforming nascent scaffolds into structurally complex and biologically active natural products. Alchivemycin A (AVM, 1) is a highly oxidized polycyclic compound with potent antimicrobial activity and features a rare 2H-tetrahydro-4,6-dioxo-1,2-oxazine (TDO) ring system. The scaffold of AVM has previously been shown to be biosynthesized by a hybrid polyketide synthase-nonribosomal peptide synthetase (PKS-NRPS) pathway. In this study, we present a postassembly secondary metabolic network involving six redox enzymes that leads to AVM formation. We characterize this complex redox network using in vivo gene deletions, in vitro biochemical assays, and one-pot enzymatic total synthesis. Importantly, we show that an FAD-dependent monooxygenase catalyzes oxygen insertion into an amide bond to form the key TDO ring in AVM, an unprecedented function of flavoenzymes. We also show that the TDO ring is essential to the antimicrobial activity of AVM, likely through targeting the β-subunit of RNA polymerase. As further evidence, we show that AvmK, a β-subunit of RNA synthase, can confer self-resistance to AVM via target modification. Our findings expand the repertoire of functions of flavoenzymes and provide insight into antimicrobial and biocatalyst development based on AVM.