beta-Carboline (beta C) alkaloids constitute a large family of indole alkaloids that exhibit diverse pharmacological properties, such as antitumor, antiviral, antiparasitic, and antimicrobial activities. Here, we report that a flavoprotein StnP2 catalyzes the dehydrogenation at C1-N2 of a tetrahydro-beta-carboline (TH beta C) generating a 3,4-dihydro-beta-carboline (DH beta C), and the DH beta C subsequently undergoes a spontaneous dehydrogenation to beta C formation involved in the biosynthesis of the antitumor agent streptonigrin. Biochemical characterization showed that StnP2 catalyzed the highly regio-and stereo-selective dehydrogenation, and StnP2 exhibits promiscuity toward different TH beta Cs. This study provides an alternative kind of enzyme catalyzing the biosynthesis of beta C alkaloids and enhances the importance of flavoproteins.