Zero linear compressibility (ZLC) and zero thermal expansion (ZTE) are unique and rare properties because of their excellent resistance to pressure and temperature, respectively. Metamaterials possessing both ZLC and ZTE will have promising application prospects. Herein, we conducted density functional theory studies on MC4O4 (M = Pb and Ba), which have "dumbbell"-like structures with ZTE property reported previously. The results show that the two compounds exhibit ZLC over the studied pressure range of 0 to 10 GPa along the c-axis, which is also the reported ZTE direction. Meanwhile, the ZLC can be furtherly tuned in value by replacing the metal element. The predicted ZLC phenomena in ZTE materials provide inspirations for designing and discovering new ZLC + ZTE metamaterials.