The escalating urgency to mitigate climate change and enhance energy security has prompted heightened exploration of hydrogen production via electrocatalysis as a viable alternative to conventional fossil fuels. Among the myriad of electrocatalysts under investigation, two-dimensional (2D) metal–organic frameworks (MOFs) stand out as a particularly appealing option. Their unique properties, including a large active specific surface area, distinctive pore structure, ample metal active sites, ultra-thin thickness, superior ion transport efficiency, fast electron transfer rate, and the ability to control the morphological synthesis, endow these frameworks with exceptional versatility and promising potential for electrocatalytic applications. In this review, we delineate the structural features and advantages of 2D MOFs and their derivatives. We proceed to summarize the latest advancements in the synthesis and utilization of these materials for electrocatalytic hydrogen evolution reactions (HER) and oxygen evolution reactions (OER). Finally, we scrutinize the potential and challenges inherent to 2D MOFs and their derivatives in practical applications, underscoring the imperative for continued research in this captivating field of electrocatalysis.