Development of effective, stable, and economic electrocatalysts is critical for further implementation of fuel cells, water electrolysis, and metal-air batteries in clean energy conversion technologies. As a subfamily of metal-organic frameworks (MOFs), zeolitic imidazolate frameworks (ZIFs) possess the characteristics of both MOFs and zeolites, showing highly porous structures, large surface area, and open catalytic active sites. This review presents materials design strategies for constructing improved electrocatalysts based on ZIF precursors/templates, with special emphasis on the varieties of derivatives, controllable building of active sites, the construction of macroscopic structure, and the favored electrocatalytic reactions based on these materials. These ZIF-derived N-doped carbon-based composites or compounds have exhibited remarkable activity and stability for a broad electrocatalysis application, displaying great potential to replace noble-metal-based catalysts. The challenges and perspectives regarding ZIF-derived electrocatalysts are also discussed for better development of ZIF-derived electrocatalysts.