The Mycobacterium tuberculosis cytochrome P450 enzyme CYP142 is encoded in a large gene cluster involved in metabolism of host cholesterol. CYP142 was expressed and purified as a soluble, low spin P450 hemoprotein. CYP142 binds tightly to cholesterol and its oxidized derivative cholest-4-en-3-one, with extensive shift of the heme iron to the high spin state. High affinity for azole antibiotics was demonstrated, highlighting their therapeutic potential. CYP142 catalyzes either 27-hydroxylation of cholesterol/cholest-4-en-3-one or generates 5-cholestenoic acid/cholest-4-en-3-one-27-oic acid from these substrates by successive sterol oxidations, with the catalytic outcome dependent on the redox partner system used. The CYP142 crystal structure was solved to 1.6 Å, revealing a similar active site organization to the cholesterol-metabolizing M. tuberculosis CYP125, but having a near-identical organization of distal pocket residues to the branched fatty acid oxidizing M. tuberculosis CYP124. The cholesterol oxidizing activity of CYP142 provides an explanation for previous findings that ΔCYP125 strains of Mycobacterium bovis and M. bovis BCG cannot grow on cholesterol, because these strains have a defective CYP142 gene. CYP142 is revealed as a cholesterol 27-oxidase with likely roles in host response modulation and cholesterol metabolism.