Glandular damage can be caused by various factors, including disease, trauma, or other abnormalities within the organism. The viscosity of the gland is one of the important indicators to measure the degree of damage. Sulfur dioxide (SO2) is widely used as an important food additive due to its preservative and bleaching properties, but its overuse has serious negative impacts on the environment, so it is urgent to develop a simple detection method. Herein, we designed and synthesized a mitochondria-targeted near-infrared (NIR) fluorescence probe (BDC) for the detection of viscosity and SO2. BDC consisted of a donor-π-acceptor (D-π-A) structure and extended double bonds bridging rotor, which enabled sensitive response to viscosity and intense fluorescence emission. The TICT (twisted intramolecular charge transfer) of BDC was inhibited with an increase in viscosity, accompanied by a significant enhancement of red fluorescence signal with emission wavelength beyond 800 nm. Notably, BDC was able to noninvasively and sensitively monitor the viscosity changes in the glands of non-obese diabetic (NOD) mice model. BDC was utilized for monitoring SO2 in food and environmental samples through Michael addition reactions, providing a straightforward tool for SO2 detection in food safety and environmental monitoring.