Albaflavenone synthase (CYP170A1) is a monooxygenase catalyzing the final two steps in the biosynthesis of this antibiotic in the soil bacterium, Streptomyces coelicolor A3(2). Interestingly, CYP170A1 shows no stereo selection forming equal amounts of two albaflavenol epimers, each of which is oxidized in turn to albaflavenone. To explore the structural basis of the reaction mechanism, we have studied the crystal structures of both ligand-free CYP170A1 (2.6 A) and complex of endogenous substrate (epi-isozizaene) with CYP170A1 (3.3 A). The structure of the complex suggests that the proximal epi-isozizaene molecules may bind to the heme iron in two orientations. In addition, much to our surprise, we have found that albaflavenone synthase also has a second, completely distinct catalytic activity corresponding to the synthesis of farnesene isomers from farnesyl diphosphate. Within the cytochrome P450 alpha-helical domain both the primary sequence and x-ray structure indicate the presence of a novel terpene synthase active site that is moonlighting on the P450 structure. This includes signature sequences for divalent cation binding and an alpha-helical barrel. This barrel is unusual because it consists of only four helices rather than six found in all other terpene synthases. Mutagenesis establishes that this barrel is essential for the terpene synthase activity of CYP170A1 but not for the monooxygenase activity. This is the first bifunctional P450 discovered to have another active site moonlighting on it and the first time a terpene synthase active site is found moonlighting on another protein.