It is important to develop fluorescent probes for rapid, selective, and sensitive detection of highly toxic hydrazine in both environmental and biological science. In this text, under mild conditions, a novel nearinfrared (NIR) ratiometric and on-off fluorescent probe 1 was synthesized based on hemicyanine and coumarin derivatives, which can detect hydrazine with high selectivity and anti-interference over other amines, biological species, anions and metal ions. The limit of quantification (LOQ) value was 0-400 mM and the detection limit could be as low as 560 nM.