Hydrazine induced toxicity causes serious harm to the health of humans. The detection of N2H4 in vitro and in vivo has attracted a great deal of attention, especially in the context of fluorescent probes. Although some fluorescent N2H4 probes have been reported, only a few operate in purely aqueous media and, as a result, require the use of organic cosolvents which hinders their use in analysis of real samples. In addition, most of the current N2H4 probes are either "off-on" or "on-off" types, in which it is difficult to eliminate interference from background fluorescence commonly occurring in in vitro and in vivo systems. Furthermore, some probes are unable to differentiate hydrazine from other organic amines. To address the above problems, we developed a novel oligo(ethylene glycol)-functionalized fluorescent probe for the detection of N2H4. The probe, which has a donor-π-acceptor (D-π-A)-type structure, is water-soluble, and it can be utilized to selectively detect N2H4 in both colorimetric and ratiometric mode. Furthermore, the probe is able to differentiate hydrazine from other organic amines and can be used to detect hydrazine vapor and for imaging A549 cells and zebrafish.