Tumor-associated macrophages (TAMs) usually adopt a tumor-promoting M2-like phenotype, which largely impedes the immune response and therapeutic efficacy of solid tumors. Repolarizing TAMs from M2 to the antitumor M1 phenotype is crucial for reshaping the tumor immunosuppressive microenvironment (TIME). Herein, we developed self-assembled nanoparticles from the polymeric prodrug of resiquimod (R848) to reprogram the TIME for robust cancer immunotherapy. The polymeric prodrug was constructed by conjugating the R848 derivative to terminal amino groups of the linear dendritic polymer composed of linear poly(ethylene glycol) and lysine dendrimer. The amphiphilic prodrug self-assembled into nanoparticles (PLRS) of around 35 nm with a spherical morphology. PLRS nanoparticles could be internalized by antigen-presenting cells (APCs) in vitro and thus efficiently repolarized macrophages from M2 to M1 and facilitated the maturation of APCs. In addition, PLRS significantly inhibited tumor growth in the 4T1 orthotopic breast cancer model with much lower systemic side effects. Mechanistic studies suggested that PLRS significantly stimulated the TIME by repolarizing TAMs into the M1 phenotype and increased the infiltration of cytotoxic T cells into the tumor. This study provides an effective polymeric prodrug-based strategy to improve the therapeutic efficacy of R848 in cancer immunotherapy.