To date, very little is known about the role of microRNA‐21‐5p (miR‐21‐5p) in Mycobacterium tuberculosis (M.tb)‐infected macrophages. Here, we show that M.tb infection of RAW264.7 and THP‐1 cells increases the expression of miR‐21‐5p. MiR‐21‐5p enhances M.tb survival and apoptosis, and attenuates the secretion of inflammatory cytokines, including interleukin (IL)‐1β, IL‐6, and tumor necrosis factor‐α in M.tb‐infected macrophages. Dual‐luciferase reporter assay revealed that the 3′‐UTR of B‐cell lymphoma 2 (Bcl‐2) or toll‐like receptor 4 (TLR4) is a direct target of miR‐21‐5p. Enforced expressions of Bcl‐2 or TLR4 partially attenuate the suppressive effects of miR‐21‐5p on cell viability and inflammatory cytokines, and effectively decrease bacterial burden. Therefore, the present study highlights a novel role for miR‐21‐5p in regulation of mycobacterial survival and inflammatory responses by targeting Bcl‐2 and TLR4 in M.tb‐infected macrophages.