Metal−organic frameworks (MOFs) are a class of nanoporous crystalline materials with very high structural tunability. They possess a very low dielectric permittivity ε r due to their porosity and hence are favorable for piezoelectric energy harvesting. Even though they have huge potential as piezoelectric materials, a detailed analysis and structure−property relationship of the piezoelectric properties in MOFs are lacking so far. This work focuses on a class of cubic non-centrosymmetric MOFs, namely, zeolitic imidazolate frameworks (ZIFs) to rationalize how the variation of different building blocks of the structure, that is, metal node and linker substituents affect the piezoelectric constants. The piezoelectric tensor for the ZIFs is computed from ab initio theoretical methods. From the calculations, we analyze the different contributions to the final piezoelectric constant d 14 , namely, the clamped ion (e 14 0 ) and the internal strain (e 14 int ) contributions and the mechanical properties. For the studied ZIFs, even though e 14 (e 14 0 + e 14 int ) is similar for all ZIFs, the resultant piezoelectric coefficient d 14 calculated from piezoelectric constant e 14 and elastic compliance constant s 44 varies significantly among the different structures. It is the largest for CdIF-1 (Cd 2+ and −CH 3 linker substituent). This is mainly due to the higher elasticity or flexibility of the framework. Interestingly, the magnitude of d 14 for CdIF-1 is higher than II−VI inorganic piezoelectrics and of a similar magnitude as the quintessential piezoelectric polymer polyvinylidene fluoride.