We designed and prepared probe W-1 for the detection of H2O2. W-1 showed excellent selectivity for H2O2 and was accompanied by colorimetric signal changes. The excellent linear relationship between fluorescence intensity and H2O2 concentration (0-100 μM) provided favorable conditions for its quantitative detection. In addition, the combination of portable test strips with a smartphone platform provided great convenience for on-site visual detection of H2O2. Moreover, W-1 possessed targeting mitochondria property and could be applied to image the exogenous and endogenous H2O2 in cells to distinguish normal cells and cancer cells. Lastly, W-1 was used for monitoring the H2O2 fluctuation of the diabetic process in mice, and the results showed an increase in H2O2 levels in diabetes. Therefore, the probe provided a tool for understanding the pathological and physiological mechanisms of diabetes by imaging H2O2.