Single-atom catalysts (SACs) have attracted increasing research interests owing to their unique electronic structures, quantum size effects and maximum utilization rate of atoms. Metal organic frameworks (MOFs) are good candidates to prepare SACs owing to the atomically dispersed metal nodes in MOFs and abundant N and C species to stabilize the single atoms. In addition, the distance of adjacent metal atoms can be turned by adjusting the size of ligands and adding volatile metal centers to promote the formation of isolated metal atoms. Moreover, the diverse metal centers in MOFs can promote the preparation of dual-atom catalysts (DACs) to improve the metal loading and optimize the electronic structures of the catalysts. The applications of MOFs derived SACs and DACs for electrocatalysis, including oxygen reduction reaction, oxygen evolution reaction, hydrogen evolution reaction, carbon dioxide reduction reaction and nitrogen reduction reaction are systematically summarized in this Review. The corresponding synthesis strategies, atomic structures and electrocatalytic performances of the catalysts are discussed to provide a deep understanding of MOFs-based atomic electrocatalysts. The catalytic mechanisms of the catalysts are presented, and the crucial challenges and perspectives are proposed to promote further design and applications of atomic electrocatalysts.