Neocarazostatin A (NZS) is a bacterial alkaloid with promising bioactivities against free radicals, featuring a tricyclic carbazole nucleus with a prenyl moiety at C-6 of the carbazole ring. Here, we report the discovery and characterization of the biosynthetic pathway of NZS through genome mining and gene inactivation. The in vitro assays characterized two enzymes: NzsA is a P450 hydroxylase and NzsG is a new phytoene-synthase-like prenyltransferase (PTase). This is the first reported native PTase that specifically acts on the carbazole nucleus. Finally, our in vitro reconstituted experiment demonstrated a coupled reaction catalyzed by NzsG and NzsA tailoring the NZS biosynthesis.