Energy harvesting, the process of capturing ambient energy from various sources and converting it into usable electrical power, has attracted a lot of attention due to its potential to provide long-term and self-sufficient energy solutions. This comprehensive review thoroughly explores the use of metal-organic frameworks (MOFs) and covalent organic frameworks (COFs) for energy harvesting by piezoelectric and triboelectric nanogenerators (PENGs and TENGs). It begins by classifying and outlining the structural diversity of MOFs and COFs, which is key to understanding their importance in energy applications. Key characterization techniques are focused on emphasizing their importance in optimizing material properties for efficient energy conversion. The working mechanisms of PENGs and TENGs are discussed, focusing on their ability to transform mechanical energy into electrical energy and their advantages in operation. The use of MOFs and COFs in energy harvesting applications is then discussed, including synthesis procedures, unique characteristics relevant to electricity conversion, and various practical applications such as self-powered sensors and wearable electronics. Current challenges such as stability, scalability, and performance improvements are explored, as well as proposed future improvements to help advance current research. Finally, the study highlights the importance of framework materials for the development of energy harvesting systems, providing an invaluable resource for academics and engineers seeking to exploit the potential of these materials for renewable energy sources. The goal of this article is to stimulate further invention and implementation of efficient materials-based energy harvesting framework devices by integrating recent advances and mapping future possibilities.