Aspergillus oryzae is a fungus widely used in traditional Japanese fermentation industries. Its inability to produce mycotoxins, due to mutation or transcriptional repression of the genes responsible for their biosynthesis, is consistent with the hypothesis that A. oryzae is a domesticated species derived from A. flavus, a wild species that is a well-known producer of aflatoxin. In contrast, the cyclopiazonic acid (CPA) biosynthetic gene (cpa) cluster in A. oryzae contains genes that have been lost in A. flavus. Through targeted gene inactivation, isolation of the corresponding metabolite, and evaluation of biological activity of the metabolite, we demonstrated that an A. oryzae-specific gene-cpaH-mediates the conversion of CPA into the less toxic 2-oxocyclopiazonic acid, a new analogue of CPA. The detoxifying properties of cpaH, which have been lost in the A. flavus pathway, reflect the relationship of the two species.