As an important cell organelle, the mitochondrion has special viscosities, while abnormal mitochondrial viscosity is closely related to many diseases. Hydrogen peroxide (H2O2) is an active molecule related to the cell microenvironment, and its influence on mitochondrial viscosity is still not clear, so further investigation is needed. In addition, since excessive accumulation of heavy metal ions would lead to cells' dysfunction, the study of effect of excessive heavy metal ions on mitochondrial viscosity has not been reported. Herein, we designed and synthesized a mitochondrial-targeting near-infrared fluorescent probe (Mito-NV) for real-time in situ imaging and analysis of mitochondrial viscosity. Furthermore, the probe revealed that H2O2 can raise mitochondrial viscosity, while heavy metal ions reduce the viscosity. This work is of great significance for understanding the execution of mitochondrial functions and the occurrence and development of related diseases.