Metal–organic frameworks (MOFs) are promising as high performance electrocatalysts in clean energy conversion and storage owing to their unique porous structures, large surface area, and atomically distributed nonprecious transition metal ions (single atom catalysts). However, the ligands or coordinations of metal ions strongly influence their catalytic activities, making it complicated for selecting better catalysts. To rationally design the MOF catalysts, we have calculated the catalytic activities of zeolitic imidazolate frameworks (ZIFs), a subset of the MOF hybrids, with the density-functional theory (DFT) methods and identified an intrinsic descriptor that governs the catalytic activities of the ZIFs. Our DFT calculations show that the unsaturated metal sites exhibit higher catalytic activities than those of the best noble metal electrocatalysts. The efficiency and selectivity of the ZIF catalysts could be improved by controlling the number of ligands/coordinations and type of metal ions. The best catalysts are identified for fuel cells, water splitting, and direct prodiction of hydrogen peroxide. The theoretical predictions are supported by experimental data. This work provides a theoretical base and guiding principles for rational design of high-performance MOF-based electrocatalysts for clean energy conversion and storage.