Viscosity is a crucial indicator of the flow state of proteins, lipids, and polysaccharides in the cell microenvironment and plays a vital role in maintaining normal cellular activities. Abnormal viscosity in any part of the cell constituents can lead to various diseases in the organism. For instance, abnormal mitochondrial viscosity can lead to diseases, such as diabetes and Parkinson's disease. Therefore, real-time monitoring of changes in mitochondrial viscosity in both pathological and physiological environments is relevant. This study describes a water-soluble xylan-based near-infrared fluorescence probe that can detect changes in cellular viscosity. The designed mitochondria-targeting near-infrared fluorophores were introduced into modified xylan to form a viscosity-sensing fluorescent probe (NI-XylV). The fluorescence intensity of NI-XylV at 590 and 670 nm gradually increases with an increase in viscosity caused by environmental changes, enabling the sensitive detection of viscosity changes in mitochondria within living cells. NI-XylV exhibits good photostability, biocompatibility, excellent mitochondrial targeting, and broad application prospects as a bio-based fluorescence probe.