Sugar moieties in natural products are frequently modified by O-methylation. In the biosynthesis of the macrolide antibiotic mycinamicin, methylation of a 6'-deoxyallose substituent occurs in a stepwise manner first at the 2'- and then the 3'-hydroxyl groups to produce the mycinose moiety in the final product. The timing and placement of the O-methylations impact final stage C-H functionalization reactions mediated by the P450 monooxygenase MycG. The structural basis of pathway ordering and substrate specificity is unknown. A series of crystal structures of MycF, the 3'-O-methyltransferase, including the free enzyme and complexes with S-adenosyl homocysteine (SAH), substrate, product, and unnatural substrates, show that SAM binding induces substantial ordering that creates the binding site for the natural substrate, and a bound metal ion positions the substrate for catalysis. A single amino acid substitution relaxed the 2'-methoxy specificity but retained regiospecificity. The engineered variant produced a new mycinamicin analog, demonstrating the utility of structural information to facilitate bioengineering approaches for the chemoenzymatic synthesis of complex small molecules containing modified sugars. Using the MycF substrate complex and the modeled substrate complex of a 4'-specific homologue, active site residues were identified that correlate with the 3' or 4' specificity of MycF family members and define the protein and substrate features that direct the regiochemistry of methyltransfer. This classification scheme will be useful in the annotation of new secondary metabolite pathways that utilize this family of enzymes.