A new turn-on fluorescent probe, named as NaFP was structured with hydrazine group as a recognition site for detecting formaldehyde (FA) in living cells. The probe NaFP has large turn-on signal and high selectivity for FA. In addition, the results of cell imaging experiments indicate that NaFP could image exogenous/endogenous FA in living cells. The new highly selective fluorescence probe ( NaFP ) was designed and synthesized for monitoring endogenous formaldehyde of the living cells. • A novel naphthalimide-based formaldehyde probe was designed. • The probe NaFP with highly selective detection to formaldehyde. • The probe NaFP had achieved in monitoring exogenous and endogenous formaldehyde in living cells. • The endoplasmic reticulum stress could lead to increased concentration of formaldehyde was verified by using the probe NaFP .