Cancer which causes high mortality globally threatens public health seriously. There is an urgent need to develop tumor-specific near-infrared (NIR) imaging agents to achieve precise diagnosis and guide effective treatment. In recent years, imaging probes that respond to acidic environments such as endosomes, lysosomes, or acidic tumor microenvironments (TMEs) are being developed. However, because of their nonspecific internalization by both normal and tumor cells, resulting in a poor signal-to-noise ratio in diagnosis, these pH-sensitive probes fail to be applied to in vivo tumor imaging. To address this issue, a cholecystokinin-2 receptor (CCK2R)-targeted TME-sensitive NIR fluorescent probe R2SM was synthesized by coupling pH-sensitive heptamethine cyanine with a CCK2R ligand, minigastrin analogue 11 (MG11) for in vivo imaging, in which MG11 would target overexpressed CCK2Rs in gastrointestinal stromal tumors (GISTs). Cell uptake assay demonstrated that R2SM exhibited a high affinity for CCK2R, leading to receptormediated internalization and making probes finally accumulated in the lysosomes of tumor cells, which suggested in the tumor tissues, the probes were distributed in the extracellular acidic TME and intracellular lysosomes. With a pK a of 6.83, R2SM can be activated at the acidic TME (pH = 6.5−6.8) and lysosomes (pH = 4.5−5.0), exhibiting an apparent pH-dependent behavior and generating more intense fluorescence in these acidic environments. In vivo imaging showed that coupling of MG11 with a pHsensitive NIR probe facilitated the accumulation of probe and enhanced the fluorescence in CCK2R-overexpressed HT-29 tumor cells. A high signal was observed in the tumor region within 0.5 h postinjection, indicating its potential application in intraoperative imaging. Fluorescence imaging of R2SM exhibited higher tumor-to-liver and tumor-to-kidney ratios (2.1:1 and 2.3:1, respectively), compared separately with the probes that are lipophilic, pH-insensitive, or MG11-free. In vitro and in vivo studies demonstrated that the synergistic effect of tumor targeting with pH sensitivity plays a vital role in the high signal-to-noise ratio of the NIR imaging probe. Moreover, different kinds of tumor-targeting vectors could be conjugated simultaneously with the NIR dye, which would further improve the receptor affinity and targeting efficiency.