Defect formation energy depends sensitively on the environment conditions.
Incorporation of lattice vibrations results in obvious temperature effect.
The point defect of Mg-rich side in MgZn2 is double at low temperature.
The anti-site defects are energetically favored over vacancies at high temperature.
The present study completely explains the different experimental observations.