Mycobacterium tuberculosis has evolved many strategies to evade elimination by the host immune system, including the selective repression of macrophage IL-12p40 production. To identify the M. tuberculosis genes responsible for this aspect of immune evasion, we used a macrophage cell line expressing a reporter for IL-12p40 transcription to screen a transposon library of M. tuberculosis for mutants that lacked this function. This approach led to the identification of the mmaA4 gene, which encodes a methyl transferase required for introducing the distal oxygen-containing modifications of mycolic acids, as a key locus involved in the repression of IL-12p40. Mutants in which mmaA4 (hma) was inactivated stimulated macrophages to produce significantly more IL-12p40 and TNF-alpha than wild-type M. tuberculosis and were attenuated for virulence. This attenuation was not seen in IL-12p40-deficient mice, consistent with a direct linkage between enhanced stimulation of IL-12p40 by the mutant and its reduced virulence. Treatment of macrophages with trehalose dimycolate (TDM) purified from the DeltammaA4 mutant stimulated increased IL-12p40, similar to the increase observed from DeltammaA4 mutant-infected macrophages. In contrast, purified TDM isolated from wild-type M. tuberculosis inhibited production of IL-12p40 by macrophages. These findings strongly suggest that M. tuberculosis has evolved mmaA4-derived mycolic acids, including those incorporated into TDM to manipulate IL-12-mediated immunity and virulence.