Methicillin-resistant Staphylococcus aureus (MRSA) can induce multiple inflammations. The biofilm formed by MRSA is resistant to a variety of antibiotics and is extremely difficult to cure, which seriously threatens human health. Herein, a nanoparticle encapsulating berberine with polypyrrole core and pH-sensitive shell to provide chemo-photothermal dual therapy for MRSA infection is reported. By integrating photothermal agent polypyrrole, berberine, acid-degradable crosslinker, and acid-induced charge reversal polymer, the nanoparticle exhibited highly efficient MRSA infection treatment. In normal uninfected areas and bloodstream, nanoparticles showed negatively charged, demonstrating high biocompatibility and excellent hemocompatibility. However, once arriving at the MRSA infection site, the nanoparticle can penetrate and accumulate in the biofilm within 2h. Simultaneously, berberine can be released into biofilm rapidly. Under the combined effect of photothermal response and berberine inhibition, 88.7% of the biofilm is removed at 1000µgmL-1 . Moreover, the nanoparticles have an excellent inhibitory effect on biofilm formation, the biofilm inhibition capacity can reach up to 90.3%. Taken together, this pH-tunable nanoparticle can be employed as a new generation treatment strategy to fight against the fast-growing MRSA infection.