Alteration of macrophage function has an important regulatory impact on the survival of intracellular mycobacteria. We found that macrophages infected with attenuated Mycobacterium tuberculosis (Mtb) strain H37Ra had elevated expression of M1-related molecules, whereas the M2 phenotype was dominant in macrophages infected with virulent Mtb H37Rv. Further, the TLR signalling pathway played an important role in modulating macrophage polarization against Mtb infection. Interestingly, endoplasmic reticulum (ER) stress was significantly increased in M1 polarized macrophages and these macrophages effectively removed intracellular Mtb, indicating that ER stress may be an important component of the host immune response to Mtb in M1 macrophages. This improved understanding of the mechanisms that regulate macrophage polarization could provide new therapeutic strategies for tuberculosis.