The evolutionary survival of Mycobacterium tuberculosis, the cause of human tuberculosis, depends on its ability to invade the host, replicate, and transmit infection. At its initial peripheral infection site in the distal lung airways, M. tuberculosis infects macrophages, which transport it to deeper tissues1. How mycobacteria survive in these broadly microbicidal cells is an important question. Here we show in mice and zebrafish that M. tuberculosis, and its close pathogenic relative Mycobacterium marinum, preferentially recruit and infect permissive macrophages while evading microbicidal ones. This immune evasion is accomplished by using cell-surface-associated phthiocerol dimycoceroserate (PDIM) lipids2 to mask underlying pathogen-associated molecular patterns (PAMPs). In the absence of PDIM, these PAMPs signal a Toll-like receptor (TLR)-dependent recruitment of macrophages that produce microbicidal reactive nitrogen species. Concordantly, the related phenolic glycolipids (PGLs)2 promote the recruitment of permissive macrophages through a host chemokine receptor 2 (CCR2)-mediated pathway. Thus, we have identified coordinated roles for PDIM, known to be essential for mycobacterial virulence3, and PGL, which (along with CCR2) is known to be associated with human tuberculosis4, 5. Our findings also suggest an explanation for the longstanding observation that M. tuberculosis initiates infection in the relatively sterile environment of the lower respiratory tract, rather than in the upper respiratory tract, where resident microflora and inhaled environmental microbes may continually recruit microbicidal macrophages through TLR-dependent signalling.