A naphthalimide-based two-photon probe (AHGa) for the detection of cell senescence is designed. The probe contains a naphthalimide core, an l-histidine methyl ester linker, and an acetylated galactose bonded to one of the aromatic nitrogen atoms of the l-histidine through a hydrolyzable N-glycosidic bond. Probe AHGa is transformed into AH in senescent cells resulting in an enhanced fluorescent emission intensity. In vivo detection of senescence is validated in mice bearing tumor xenografts treated with senescence-inducing chemotherapy.