Many biologically active natural products have macrocyclic structures. In nonribosomal peptides macrocyclization is commonly achieved via the formation of intramolecular ester or amide bond catalyzed by thioesterase domains during biosynthesis. A unique and so far unknown type of peptide cyclization occurs in the nostocyclopeptide, a macrocyclic imine produced by the terrestrial cyanobacterium Nostoc sp. ATCC53789. In this work we show that a C-terminal reductase domain of the nostocyclopeptide nonribosomal peptide synthetase catalyzes the reductive release of a linear peptide aldehyde and thereby triggers the spontaneous formation of a stable imino head-to-tail linkage. This type of molecular self-assembly induced by the reductive release of reactive aldehydes may be more commonplace in other complex nonribosomal peptides than originally thought.