A novel H 2 O 2 -responsive carbon monoxide nanogenerator was designed by effectively encapsulating a manganese carbonyl prodrug into porphyrinic covalent organic polymers for realizing the combined CO gas and photodynamic therapy under near infrared light irradiation.