Diabetes is one of the metabolic diseases marked by hyperglycemia and is often accompanied by the occurrence of some complications. As a biomarker of oxidative stress, hydrogen peroxide (H 2 O 2 ) has close association with the occurrence and development of diabetes and its complications. Unfortunately, there is no fluorescent probe reported for imaging H 2 O 2 in diabetic mice. Here, a novel near-infrared (NIR) fluorescent probe named QX-B was designed and synthesized to detect H 2 O 2 . For the probe, the quinolinium-xanthene dye is used as the fluorophore and borate ester is chosen as the response group. After the addition of H 2 O 2 , a strong NIR fluorescence signal at 772 nm is observed. The probe not only shows high sensitivity with 10-fold enhancement but also displays excellent selectivity to H 2 O 2 over other possible interfering species. In the meantime, the possible response mechanism of QX-B toward H 2 O 2 was proposed and verified by the high-performance liquid chromatography (HPLC) experiment, mass spectra (MS) experiment, and density functional theory (DFT) calculation. Furthermore, based on the low cell cytotoxicity of QX-B, it has been applied in imaging exogenous and endogenous H 2 O 2 in HeLa cells, HCT116 cells, 4T1 cells, and zebrafish successfully. More importantly, inspired by the performance of NIR fluorescence, QX-B has been used in monitoring H 2 O 2 in diabetic mice for the first time. This provides very important information for the diagnosis and treatment of diabetes and its complications.