Ribosomally synthesized and post-translationally modified peptide natural products have provided many highly unusual scaffolds. This includes the intriguing alkaloids crocagins, which possess a tetracyclic core structure and whose biosynthesis has remained enigmatic. Here we use in vitro experiments to demonstrate that three proteins, CgnB, CgnC and CgnE, are sufficient for the production of the hallmark tetracyclic crocagin core from the precursor peptide CgnA. The crystal structures of the homologues CgnB and CgnE reveal them to be the founding members of a peptide-binding protein family and allow us to rationalize their distinct functions. We further show that the hydrolase CgnD liberates the crocagin core scaffold, which is subsequently N-methylated by CgnL. These insights allow us to propose a biosynthetic scheme for crocagins. Bioinformatic analyses based on these data led to the discovery of related biosynthetic pathways that may provide access to a structurally diverse family of peptide-derived pyrroloindoline alkaloids.