Nanoprobes based on lanthanide-doped upconversion nanoparticles (UCNPs) exhibit promising potential in bioimaging and biosensing due to their unique optical properties. However, conventional UCNP nanoprobes based on the dye quenching effect are still limited in biosensing due to their low upconversion efficiency. The advent of dye-sensitized upconversion has resulted in nanoprobes with significantly enhanced efficiency; however, these still suffer from a high initial emissive background. In view of this, herein, we have constructed a dye-quenched/sensitized switching upconversion nanoprobe for high-contrast imaging of the pH-related tumor microenvironment. Under normal conditions, the luminescence of the nanoprobe at 540 nm (UCL540) was significantly quenched by the employed dye. Upon being triggered by an acid, the dye would switch to its fluorescent form to sensitize the luminescence of UCNPs, affording a significant enhancement of UCL540. The switching from dye-quenched UCL to dye-sensitized UCL jointly enables the detection of a high signal-to-background ratio (high up to 50), allowing for high-contrast mapping of the tumor specific acidic microenvironment in vivo. We believe that this nanoplatform holds considerable promise for acid-related sensing.