The development of nanotechnology provides hope for precision sterilization, but traditional physical encapsulation of drugs and non-targeted treatments is prone to drug leakage and non-specific damage. Besides, traditional fluorescence imaging is subject to autofluorescence interference and non-specific damage caused by continuous excitation. Herein, we report a pH-/H 2 O 2activated and self-luminous nanosphere for intelligent bacteriatargeting and self-reported imaging-guided precision phototherapy sterilization. pH-responsive porphyrin derivative-grafted carboxymethyl chitosan (CMC-PC-N) was designed and synthesized as bacterial microenvironment-responsive nanocarriers and phototherapeutic agents. Peroxyoxalate (CPPO), a H 2 O 2 -responsive chemiluminescence substrate, was further employed as a built-in initiator for self-reported imaging and self-assembled with CMC-PC-N to form the nanosphere by nanoprecipitation (CPPO@ CMC-PC-N). Hydrophilicity of the nanosphere increases in the bacterial acidic microenvironment due to the protonation of N atoms in CPPO@CMC-PC-N, resulting in the dissociation of nanospheres and the rapid release of CPPO. As a result, the formed positively charged CMC-PC-N targets bacteria by electrostatic adsorption. Meanwhile, the reaction of the released CPPO with endogenous H 2 O 2 activates the fluorescence of the porphyrin to achieve self-report imaging. Also, precision phototherapy sterilization is further activated by external irradiation under imaging guidance. The microenvironment-triggered disassembly, rapid CPPO release, and self-luminous properties integrated with good biocompatibility ensure CPPO@CMC-PC-N intelligent bacteriatargeting, self-report imaging with non-background interference, and efficient phototherapy sterilization with negligible side effects.