Modular type I polyketide synthases (PKSs) comprise a family of enzymes that synthesize a diverse class of natural products with medicinal applications. The biochemical features of these systems include the extension and processing of polyketide chains in a stepwise, stereospecific manner, organized by a series of modules divided into distinct catalytic domains. Previous work revealed that a primary hurdle for utilizing PKS modules to create diverse macrolactones hinges on the selectivity of the thioesterase (TE) domain. Herein, we generated a novel hybrid 12-membered macrolactone/lactam ring system employing an unnatural amide hexaketide intermediate in conjunction with an engineered TE S148C mutant from the pikromycin (Pik) biosynthetic pathway. This unnatural macrocycle was initially formed in severely attenuated yields compared to the native product generated from the natural hexaketide substrate. A step-wise directed evolution campaign generated Pik TE variants with enhanced selectivity for macrocycle formation over hydrolysis. Over three rounds of evolution, a series of mutant Pik TE proteins were identified, and further combinations of beneficial mutations carried from each round produced a composite variant with six-fold enhanced isolated yield of the hybrid macrocycle compared to the parent TE enzyme. This study offers new insights into the range of amino acid residues, both proximal and distal to the active site that impart improved selectivity and yield against the unnatural polyketide substrate and overcoming a key PKS pathway gatekeeper.