A novel coumarin–naphthalimide‐based ratiometric fluorescent probe, called XPT, was synthesized with the aim of achieving high sensitivity and anti‐interference for N2H4 detection. The probe XPT consists of coumarin species and naphthalimide species, which act as the energy donor and acceptor, respectively. The phthalimide group functions as the recognition unit for N2H4. Without the presence of hydrazine, the naphthalimide remains in a non‐fluorogenic phthalimide mode, disrupting the FRET signal. However, the phthalimide group undergoes the Gabriel reaction to an amine, which induces FRET and consequently causes a shift in the emitted fluorescence from 468 to 528 nm when N2H4 was added. The results of the study demonstrated that XPT exhibits high sensitivity with a limit of detection 2.2 μM, as well as selectivity. Furthermore, it is remarkable that the distribution of N2H4 in real water samples can be monitored by XPT.