As a vital bacteria-secreted toxin, hydrogen peroxide (H2O2) can destroy infected tissues and increase vascular permeability, leading to life-threatening systemic bacteremia or sepsis. No strategy that can alleviate H2O2-induced injury and prevent systemic sepsis has been reported. Herein, as a proof of concept, we demonstrate the use of H2O2-reactive metal-organic framework nanosystems (MOFs) for treating H2O2-secreting bacteria. In mice infected with Streptococcus pneumoniae (S. pneumoniae) isolated from patients, MOFs efficiently accumulate in the lungs after systemic administration due to infection-induced alveolar-capillary barrier dysfunction. Moreover, MOFs sequester pneumococcal H2O2, reduce endothelial DNA damage, and prevent systemic dissemination of bacteria. In addition, this nanosystem exhibits excellent chemodynamic bactericidal effects against drug-resistant bacteria. Through synergistic therapy with the antibiotic ampicillin, MOFs eliminate over 98% of invading S. pneumoniae, resulting in a survival rate of greater than 90% in mice infected with a lethal dose of S. pneumoniae. This work opens up new paths for the clinical treatment of toxin-secreting bacteria.