Indolosesquiterpene xiamycin A features a pentacyclic core structure. The chemical synthesis of two key precursors, 3-farnesylindole and 3-(epoxyfarnesyl)-indole, allowed elucidation of the enzymatic cascades forming the pentacyclic ring system of xiamycin A by XiaO-catalyzed epoxidation and the membrane protein XiaH-catalyzed terpene cyclization. The substrate flexibility of XiaI, an indole oxygenase for assembly of the central ring, was also demonstrated.