This review highlights the biosynthesis of heterocycles in polyketide natural products with a focus on oxygen and nitrogen-containing heterocycles with ring sizes between 3 and 6 atoms. Heterocycles are abundant structural elements of natural products from all classes and they often contribute significantly to their biological activity. Progress in recent years has led to a much better understanding of their biosynthesis. In this context, plenty of novel enzymology has been discovered, suggesting that these pathways are an attractive target for future studies.