A novel amperometric sensor based on ZIF-8 nanocrystals (Ag/ZIF-8/CPE) was developed to detect hydrazine. Nano-sized ZIF-8 was synthesized via a facile method and its structure was characterized through various techniques such as X-ray diffraction (XRD), scanning electronic microscopy (SEM), Brunauer–Emmett–Teller (BET) and Fourier transform infrared (FT-IR). CPE was then modified with ZIF-8 nanocrystals followed by loading of Ag to fabricate Ag/ZIF-8/CPE. According to cyclic voltammetry results, Ag/ZIF-8/CPE indicated good electrocatalytic activity toward the oxidation of hydrazine. The modified electrode was then applied as a sensor for amperometric detection of hydrazine. The sensor exhibited a wide linear range from 6 to 5000 M, a low detection limit (S/N = 3) of 1.57 M, high sensitivity of 54.46 A mM−1 cm−2 and a good response time of about 3 s. In addition, the sensor showed high selectivity toward the detection of hydrazine in the presence of some common interferents. The practical application of the sensor was evaluated in different water samples with good recoveries