Esterase is an enzyme that catalyzes the hydrolysis of esters widely found in animals and plants. Esterase serves as a crucial biomarker for the diagnosis of tumors due to its overexpression in human cancer cells. The ratiometric fluorescent probe has the advantage of having two distinct emission wavelengths. This allows for the elimination of the effects of light intensity and optical path length by using the fluorescence intensity ratio between the two emission wavelengths. This method results in more accurate and effective quantitative detection of biological systems. Near infrared (with emission located in 650-1700 nm) fluorescent probes offer several advantages such as wide application fields, high signal-to-noise ratio, and low tissue damage due to their high tissue penetration capabilities. Therefore, a novel near-infrared fluorescence probe P1 for ratiometric monitoring of esterase was developed in this work. Compared with ordinary ratiometric probes, both emission wavelengths of this probe are in the near-infrared region, which can effectively eliminate various fluctuations and blurriness in image contrast and achieve precise quantitative analysis. P1 itself has a fluorescence emission at 717 nm. After incubated with esterase, a new emission peak at 828 nm emerged due to esterase's catalysis, and the fluorescence intensity at 717 nm steadily decreased. What’s more, P1 showed high selectivity for esterase and was successfully applied for biological imaging in living cells and in vivo.