Diabetes mellitus and its complications are one of the largest healthcare burdens in the world and are increasing every year. However, the lack of effective biomarkers and non-invasive real-time monitoring tools remains a great challenge for the early diagnosis of diabetes mellitus. Endogenous formaldehyde (FA) represents a key reactive carbonyl species in biological systems, and altered metabolism and functions of FA have been closely related to the pathogenesis and maintenance of diabetes. Among various noninvasive biomedical imaging techniques, the identification-responsive fluorescence (FL) imaging could greatly benefit the comprehensive multi-scale assessment of some diseases such as diabetes. Herein, we have designed a robust activatable two-photon probe DM-FA for the first highly selective monitoring of fluctuations in FA levels during diabetes mellitus. Through the density functional theory (DFT) theoretical calculations, we elucidated the rationality of the activatable fluorescent probe DM-FA turning on the FL before and after the reaction with FA. In addition, DM-FA has excellent high selectivity, high growth factor and good photostability in the process of recognizing FA. Due to the brilliant two-photon and one-photon FL imaging capabilities of DM-FA, it has been successfully used to visualize of exogenous and endogenous FA in cells and mice. Remarkably, as a powerful FL imaging visualization tool, DM-FA was introduced for the first time to visually diagnose and explore diabetes through the fluctuation of FA content. The successful application of DM-FA in two-photon and one-photon FL imaging experiments found elevated FA levels in high glucose-stimulated diabetic cell models. We successfully visualized upregulation of FA levels in diabetic mice and decreased of FA levels in diabetic mice scavenged by NaHSO3 from multiple perspectives using multiple imaging modalities. This work may provide a novel strategy for the initial diagnosis of diabetes mellitus and the evaluation of the efficacy of drug therapy for treating diabetes mellitus, which will likely have a positive impact on clinical medicine.