Prenylated indole alkaloids (PIAs) possess great structural diversity and show biological activities. Despite significant efforts in investigating the biosynthetic mechanism, the key step in the transformation of 2,5-diazabicyclo[2.2.2]octane-containing PIAs into a distinct class of pentacyclic compounds remains unknown. Here, using a combination of gene deletion, heterologous expression, and biochemical characterization, we show that a unique fungal P450 enzyme CtdY catalyzes the cleavage of the amide bond in the 2,5-diazabicyclo[2.2.2]octane system, followed by a decarboxylation step to form the 6/5/5/6/6 pentacyclic ring in 21R-citrinadin A. We also demonstrate the function of a subsequent cascade of stereospecific oxygenases to further modify the 6/5/5/6/6 pentacyclic intermediate en route to the complete 21R-citrinadin A biosynthesis. Our findings reveal a key enzyme CtdY for the pathway divergence in the biosynthesis of PIAs and uncover the complex late-stage post-translational modifications in 21R-citrinadin A biosynthesis.