Presently, interfacial intermetallic compounds play a vital role in determining the reliability of solder joints due to their intrinsic mechanical property. Especially for Zn–Al solder joints, the interfacial Cu–Zn IMCs grow significantly without diffusion barriers. This work comprehensively investigated the mechanical properties of interfacial IMCs in Zn–Al solder joints with and without the Ni–W–P diffusion barrier by nanoindentation tests and first-principles calculations. The nanoindentation results show that the elastic moduli of CuZn4, Cu5Zn8, CuZn and Al3Ni2 were 68.45 ± 1.4 GPa, 142.6 ± 2.3 GPa, 94.7 ± 1.16 GPa, and 221 ± 18.9 GPa, respectively. Their corresponding hardness were 1.03 ± 0.04 GPa, 5.98 ± 0.23 GPa, 1.38 ± 0.16 GPa, and 17.7 ± 0.16 GPa. Through first-principles calculations, the bulk modulus of CuZn and Cu5Zn8 exhibits isotropic behaviour, while CuZn4 and Al3Ni2 demonstrate anisotropy. In addition, the bulk modulus, shear modulus, Young's modulus and hardness values of Al3Ni2 are considerably higher when compared to those of Cu–Zn intermetallic compounds.