The molecular probe oriented detection of disease-associated hallmarks has aroused great attention in analytical domain. However, the bioactivity evaluation of probe after recognition is rarely investigated in detection process. Herein, a rational strategy by electronic tuning for specific H2S-activated fluorescence sensing and in situ thio-photosensitizer generation for enhanced solid tumor phototherapy was proposed. Three NIR-absorbing molecular probes (Cy735, Cy795 and Cy841) were synthesized based on our strategy. Different electronic distribution in three probes significantly changed the reactive site of H2S-associated thiolysis. For Cy735, further initiate in situ formation of thio-photosensitizer Cy581, which diminish the energy gap of S1-T1, promote the process of intersystem crossing (ISC), thus resulting in high singlet oxygen (1O2) generation efficiency and PDT therapeutic effect. Cy735 and Cy795 could successfully be employed for the fluorescence imaging of endogenous H2S in colon cancer cells. The therapeutic evaluation exhibited that Cy735 can strikingly promote tumorous cell death and suppress solid tumor growth under 808 nm light irradiation after H2S stimulated. In vivo model revealed that, the fluorescence signal of Cy735 in the tumor site was obviously enhanced in 12–32 h after administered through tail intravenous injection, which indicated that Cy735 can selectively target and accumulate in the solid tumor and the retention time is about 20 h. It is adequately envisioned that our strategy will provide promising tool for efficient tumor photoablation as well as extend the options of excellent agents for clinical cancer therapy.