Severe infectious diseases caused by pathogenic bacteria have become urgent threats to global public health. Antibacterial materials with combined chemophotothermal therapeutic capabilities possess distinct advantages when compared with many other antibacterial approaches. However, developing simplified and chemically tunable precursors to synthesize such antibacterial nanoagents for rapidly, safely, and synergistically combating pathogenic bacteria remains a huge challenge. Herein, metal-organic framework (MOF)-derived nanocarbons with near-infrared (NIR)-responsive and sizetransformable capabilities are designed to overcome this challenge. The MOF-derived nanocarbons with chemo-photothermal bactericidal capabilities are first synthesized, and then coated with a thermoresponsive gel layer to obtain ON-OFF switching capability for bacterial trapping. The fabricated nanocarbons exhibit high photo-to-thermal conversion efficiency and fast size transformation from nanodispersions to micrometer aggregations upon NIR irradiation, thus enabling nanocarbons to generate localized massive heat and abundant Zn 2+ ions for directly disrupting bacterial membrane and intracellular proteins. Furthermore, these nanocarbons not only exhibit a nearly 100% bactericidal ratio at very low dosage, but also possess highly efficient and safe wound disinfection activities, which are comparable to vancomycin. Overall, these proposed novel nanocarbons display robust and localized chemo-photothermal bactericidal capability and possess great potential to be used as alternative to antibiotics for broad-spectrum eradication of pathogenic bacteria.