The demand to develop highly efficient electrocatalysts for renewable energy conversion has dramatically increased over the past few years. Metal–organic frameworks (MOFs) and covalent–organic frameworks (COFs) have emerged as promising materials to improve the catalytic efficiency of a variety of electrochemical energy conversion reactions. Compared to 3D bulk MOFs and COFs, which are commonly obtained by typical synthesis routes, 2D MOFs and COFs are achieved through innovative synthesis strategies, and exhibit further benefits in terms of chemical and structural properties. Specifically, the large porosity and ultrathin structure of the 2D materials contribute to exotic properties such as large surface area, mechanical flexibility, enhanced electrical conductivity, and rapid mass transport during reactions, which are highly applicable to electrocatalysis. In this review, the synthesis methods of 2D MOFs and COFs are first discussed. Then, the distinct advantages and recent advances in 2D materials for electrocatalytic reactions, including water splitting, O2 reduction reaction, CO2 reduction reaction, and N2 reduction reaction, are introduced. Finally, based on existing challenges, crucial issues for the development of reliable 2D MOFs and COFs with enhanced catalytic performance are discussed.