Covering: 2015 to 2020Nitrogen heterocyclic natural products (NHNPs) are primary or secondary metabolites containing nitrogen heterocyclic (N-heterocyclic) skeletons. Due to the existence of the N-heterocyclic structure, NHNPs exhibit various bioactivities such as anticancer and antibacterial, which makes them widely used in medicines, pesticides, and food additives. However, the low content of these NHNPs in native organisms severely restricts their commercial application. Although a variety of NHNPs have been produced through extraction or chemical synthesis strategies, these methods suffer from several problems. The development of biotechnology provides new options for the production of NHNPs. This review introduces the recent progress of two strategies for the biosynthesis of NHNPs: enzymatic biosynthesis and microbial cell factory. In the enzymatic biosynthesis part, the recent progress in the mining of enzymes that synthesize N-heterocyclic skeletons (e.g., pyrrole, piperidine, diketopiperazine, and isoquinoline), the engineering of tailoring enzymes, and enzyme cascades constructed to synthesize NHNPs are discussed. In the microbial cell factory part, with tropane alkaloids (TAs) and tetrahydroisoquinoline (THIQ) alkaloids as the representative compounds, the strategies of unraveling unknown natural biosynthesis pathways of NHNPs in plants are summarized, and various metabolic engineering strategies to enhance their production in microbes are introduced. Ultimately, future perspectives for accelerating the biosynthesis of NHNPs are discussed.