Laser ranging utilizes laser beams to accurately measure distances with high precision, enabling applications in various fields. However, traditional laser ranging based on visible light faces limitations in penetrating obstacles and ranging target objects. In this study, we propose a refreshing obstacle ranging method that combines the high-penetration capabilities of 980 nm near-infrared (NIR) lasers with the color-variable properties of NaYF4:Yb3+,Er3+@NaYF4 upconversion nanoparticles (UCNPs). By adjusting the power density of the 980 nm NIR laser, the upconversion luminescence (UCL) color of the UCNPs can be modulated from green to red, which is attributed to the varied cross-relaxation (CR) and back energy transfer (BET) processes. Additionally, by varying the distance between the 980 nm NIR laser and the UCNPs, the emission colors of the UCL undergo a gradual modulation from red to green within the range of 0–30 cm. This breakthrough enables laser-assisted visual ranging by allowing laser beams to penetrate obstacles, including liquids with low light transmittance and solid materials with low transparency. This innovative approach opens up potential possibilities for the application of light-emitting materials in the field of laser obstacle ranging.