The use of heterometallic pivalate complexes [M2Ln(piv)7(H2O)2] (M = Zn2+, Cd2+; Ln = Eu3+, Tb3+; piv– = pivalate anion) as sources of heterometallic sites in the reaction with 1,4-naphthalenedicarboxylic acid (H2ndc) makes it possible to fully preserve the geometry of the building block in the structure of the obtained metal–organic organic frameworks (MOFs). Solvothermal synthesis in dimethylformamide (DMF) results in a series of isostructural layered MOFs (Me2NH2)[M2Ln(dmf)2(ndc)4]·DMF. The structure of the MOF (Me2NH2)[Cd2Tb(dmf)2(ndc)4]·DMF was determined by the means of single crystal X-ray diffraction analysis. Compounds based on europium cations show characteristic luminescence in the red region, while compounds based on terbium cations do not exhibit characteristic green luminescent properties and have ligand-centered emission. The reactions of [Cd2Eu(piv)7(H2O)2] under similar conditions with 2,5-furandicarboxylic acid (H2fdc) are complicated, with complete destruction of the heterometallic fragment. The composition and structure of the homometallic MOF (Me2NH2)2[Cd(fdc)2]·DMF·H2O obtained in such conditions were determined by single crystal X-ray diffraction performed using synchrotron radiation.