Lithium-ion batteries (LIBs) with an impressive performance have become a vital part of the electronics industry, whereas sodium-ion batteries (SIBs) are considered to be potential devices for altering LIBs in commercial applications because of their low cost and abundance of sodium resources. Metal-organic frameworks (MOFs) with high surface area, flexible chemical architectures, and easy modifications have been intensively applied in various applications such as gas absorption, drug carriers, and sensors. Also, MOFs and their derivatives have been utilized as efficient electrode materials for LIBs and SIBs. This paper first discusses with the significance and fundamentals of LIBs and SIBs. Then, advanced research related to individual MOFs, MOF-based composites, and MOF-derived products (metal, metal oxide, metal sulfides) for LIB and SIB electrode materials is discussed. Finally, the limitations and future directions for the use of MOFs in LIBs and SIBs are briefly discussed.