Purpose. This research was designed to investigate the protective effect of rifampicin (RIF) loaded by N-(2-hydroxypropyl) methylacrylamide- (HPMA-) polylactic acid (PLA) nanopolymer on macrophages infected with Mycobacterium tuberculosis (MTB). Methods. We first induced H37Rv to infect macrophages to build a cell model. Then, the HPMA-PLA nanopolymer loaded with RIF was prepared to treat MTB-infected macrophages. The macrophage activity was tested by the 3-(4,5-dimethylthiazol-2-yl)-2,5-diphenyltetrazolium bromide (MTT) assay, the nitric oxide (NO) in cells was measured through Griess reagent, and the bacterial activity of MTB was observed via the colony-forming unit (CFU) assay. The inflammation-related factors in cells were detected via the enzyme-linked immunosorbent assay (ELISA), the apoptosis of macrophages was examined via flow cytometry, and the expression of apoptosis-related proteins was determined by western blot (WB). Results. HPMA-PLA had no obvious toxicity to macrophages. The expression of NO and inflammatory factors in macrophages infected with MTB increased significantly, but the apoptosis rate was not significantly different from that of uninfected cells. However, after treatment with HPMA-PLA-RIF or free RIF, the inflammatory reaction of infected cells was inhibited, the expression of NO was decreased, the apoptosis rate was increased, and the bacterial activity in cells was decreased, with statistically significant differences; moreover, HPMA-PLA-RIF was more effective than free RIF. Conclusions. HPMA-PLA-RIF has a high protective effect on macrophages infected with MTB, with high safety. Its protective mechanism is at least partly through inhibiting the production of NO and inflammatory response, which can inhibit bacterial activity and induce cell apoptosis.