Compounds that include (a) keto group(s) in a molecule are ubiquitous natural components. A novel gene involved in ketocompound biosynthesis, designated crtW, was isolated from the marine bacteria Agrobacterium aurantiacum and Alcaligenes PC-1 that produce ketocarotenoids such as astaxanthin. When this gene was introduced into Escherichia coli that accumulated β-carotene due to the Erwinia carotenogenic genes, the E. coli transformants synthesized canthaxanthin, one of ketocarotenoids, which was identified after purification by its visible, FD-MS and 1H-NMR spectral analysis. It has been demonstrated for the first time that one gene encodes an enzyme "ketolase" that catalyzes the conversion of methylene groups of a hydrocarbon β-carotene to keto groups for synthesizing canthaxanthin via echinenone.