The allyl moiety of the immunosuppressive agent FK506 is structurally unique among polyketides and critical for its potent biological activity. Here, we detail the biosynthetic pathway to allylmalonyl-coenzyme A (CoA), from which the FK506 allyl group is derived, based on a comprehensive chemical, biochemical, and genetic interrogation of three FK506 gene clusters. A discrete polyketide synthase (PKS) with noncanonical domain architecture presumably in coordination with the fatty acid synthase pathway of the host catalyzes a multistep enzymatic reaction to allylmalonyl-CoA via trans-2-pentenyl-acyl carrier protein. Characterization of this discrete pathway facilitated the engineered biosynthesis of novel allyl group-modified FK506 analogues, 36-fluoro-FK520 and 36-methyl-FK506, the latter of which exhibits improved neurite outgrowth activity. This unique feature of FK506 biosynthesis, in which a dedicated PKS provides an atypical extender unit for the main modular PKS, illuminates a new strategy for the combinatorial biosynthesis of designer macrolide scaffolds as well as FK506 analogues.