Polyketides, one of the largest classes of natural products, are often clinically relevant. The ability to engineer polyketide biosynthesis to produce analogs is critically important. Acyltransferases (ATs) of modular polyketide synthases (PKSs) catalyze the installation of malonyl-CoA extenders into polyketide scaffolds. ATs have been targeted extensively to site-selectively introduce various extenders into polyketides. Yet, a complete inventory of AT residues responsible for substrate selection has not been established, limiting the scope of AT engineering. Here, molecular dynamics simulations are used to prioritize ~50 mutations within the active site of EryAT6 from erythromycin biosynthesis, leading to identification of two previously unexplored structural motifs. Exchanging both motifs with those from ATs with alternative extender specificities provides chimeric PKS modules with expanded and inverted substrate specificity. Our enhanced understanding of AT substrate selectivity and application of this motif-swapping strategy are expected to advance our ability to engineer PKSs towards designer polyketides.