The rising incidence of bacterial infections poses a significant challenge to global public health. The development of safe and effective antibacterial treatment strategies is an urgent need in the field of biomedicine. In this work, we developed a smart nanoparticle-hydrogel platform to address bacterial infections in wounds. Rifampicin-loaded chitosan-functionalized nanoparticles (R-CNP) could break bacterial barriers and enhance antibiotic internalization. R-CNP reduced the minimum inhibitory concentration of rifampicin against Staphylococcus aureus and greatly enhanced the bactericidal effect of rifampicin. Furthermore, R-CNP was incorporated into thermosensitive hydrogels (HG) to construct HG(R-CNP) for enhanced antibiotic accumulation and wound protection. In the mouse model with a bacterial-infected wound, treatment with R-CNP reduced the bacterial content by 98.5% as compared to treatment with free rifampicin. Therefore, this smart nanoparticle-hydrogel platform constructed by FDA-approved or natural polymers, offers significant therapeutic efficacy on bacterial-infected wounds, showing great promise for clinical translation.