Rifamycin-derived drugs, including rifampin, rifabutin, rifapentine, and rifaximin, have long been used as first-line therapies for the treatment of tuberculosis and other deadly infections. However, the late steps leading to the biosynthesis of the industrially important rifamycin SV and B remain largely unknown. Here, we characterize a network of reactions underlying the biosynthesis of rifamycin SV, S, L, O, and B. The two-subunit transketolase Rif15 and the cytochrome P450 enzyme Rif16 are found to mediate, respectively, a unique C-O bond formation in rifamycin L and an atypical P450 ester-to-ether transformation from rifamycin L to B. Both reactions showcase interesting chemistries for these two widespread and well-studied enzyme families.