The antibacterial agents deoxynybomycin (DNM) and nybomycin (NM) have a unique tetracyclic structure featuring an angularly fused 4-oxazoline ring. Here, we report the identification of key enzymes responsible for forming the 4-oxazoline ring in Embleya hyalina NBRC 13850 by comparative bioinformatics analysis of the biosynthetic gene clusters encoding structurally similar natural products DNM, deoxynyboquinone (DNQ), and diazaquinomycins (DAQs). The N-methyltransferase DnmS plays a crucial role in catalyzing the N-dimethylation of a tricyclic precursor prenybomycin to generate NM D; subsequently, the Fe(II)/α-ketoglutarate-dependent dioxygenase (Fe/αKGD) DnmT catalyzes the formation of a 4-oxazoline ring from NM D to produce DNM; finally, a second Fe/αKGD DnmU catalyzes the C-12 hydroxylation of DNM to yield NM. Strikingly, DnmT is shown to display unexpected functions to also catalyze the decomposition of the 4-oxazoline ring and the N-demethylation, thereby converting DNM back to prenybomycin, to putatively serve as a manner to control the intracellular yield of DNM. Structure modeling, site-directed mutagenesis, and quantum mechanics calculations provide mechanistic insights into the DnmT-catalyzed reactions. This work expands our understanding of the functional diversity of Fe/αKGDs in natural product biosynthesis.