<p indent="0mm">Photothermal antimicrobial therapy (PTT) has more advantages than traditional antimicrobial therapy. Photothermal conversion nanomaterials can convert optical energy into thermal energy for killing bacteria under near-infrared light. Compared with antibiotic therapy, PTT has several advantages, such as broad-spectrum antimicrobial performance, spatiotemporal specificity, minimally invasive, and deep tissue penetration, and does not cause bacterial resistance. Nevertheless, the therapeutic effect of PTT monotherapy is not ideal because it is often accompanied by side effects, such as thermal injury. To overcome this shortcoming, synergistic photothermal therapy has attracted extensive research interests. This study first synthesized mesoporous carbon nanospheres (MCNs) with commendable solar-thermal conversion performance and uniform size. Then, carboxy-rich MCNs (CMCNs) were obtained by heating in a mixed acid solution. Subsequently, polyethyleneimine (PEI) was covalently grafted onto the surface of CMCNs using the 1-ethyl-3-(3-dimethyl aminopropyl)-carbodiimide (EDC) and N-hydroxysuccinimide (NHS) coupling reaction. Finally, quaternized mesoporous carbon nanospheres (CMCN-QAC) was obtained using a quaternization reaction. The morphology and crystalline forms of MCNs were analyzed using scanning electron microscopy and X-ray diffraction. The photothermal conversion performance of CMCNs was evaluated using an infrared thermal imager. It was found that the photothermal conversion performance of CMCNs was related to the material concentration and the 808-nm near-infrared laser irradiation power intensity. Moreover, photothermal stability experiments were conducted, and the results show that the CMCNs has stable photothermal conversion performance and stability. Next, the spread plate method and live/dead staining experiments were conducted to study the synergistic photothermal antibacterial effect of CMCN-QAC<italic> in vitro</italic>. The MBC value of CMCN-QAC was 60-μg/mL under 1.5-W/cm<sup>2</sup> 808-nm near infrared (NIR) laser for <sc>10 min.</sc> Finally, to investigate the synergistic photothermal therapy of CMCN-QAC <italic>in vivo</italic>, we established a mouse model of wound infection induced by <italic>Escherichia coli</italic>. The <italic>in vitro</italic> and <italic>in vivo</italic> results showed that the CMCN-QAC+NIR group exhibited the best therapeutic effect and high biocompatibility, indicating that CMCN-QAC has great potential to serve as a novel synergistic photothermal antimicrobial nanomaterial to treat bacterial infections.