Bacterial infections pose a huge challenge to global public health, exacerbated by the growing threat of antibiotic resistance due to overuse of antibiotics, and there is an urgent need to develop epidemiological control methods that enable accurate detection and precise treatment. In this study, we present an innovative dual-response integrated probe, Nap-CefTTPy, which is capable of dual-channel fluorescence imaging, synergizing with photodynamic therapy for the accurate diagnosis and precise treatment of bacterial infections. The probe has excellent selectivity for bacteria and can produce two independent spectral responses to bacteria through two different response mechanisms under a single laser excitation, achieving accurate diagnosis of dual-channel bacterial infections. At the same time, it can also produce reactive oxygen species for synergistic photodynamic therapy, which ensures the accuracy of diagnosis and treatment. In a mouse bacterial infection model, it largely promoted the wound healing of S. aureus-infected mice. This platform represents a significant advancement in the field, providing a novel approach for the dual-code mutual correction diagnosis and photodynamic therapy of bacterial infections.