The magnetic structures of Mn3ZnN compound are theoretically studied, from which a new magnetic ground state (MGS) structure of Mn3ZnN is predicted. Comparison of the calculated volumes between different magnetic structures shows that the Mn3ZnN compound experiences a volume expansion from the high-temperature paramagnetic phase to the low-temperature antiferromagnetic phase Γ5g, and a volume contraction from the Γ5g phase to the MGS phase, in excellent agreement with the observation in experiment. Analysis of the exchange parameters between ions shows that the spin coupling between the Mn ions is responsible for the sudden expansion and contraction of the Mn3ZnN volume. Furthermore, we find that the existed N vacancies in the compound significantly lower the energy of Γ5g. When the concentration of N vacancies is large enough, Γ5g may become the ground state for the defective Mn3ZnN compound. This may be used to explain the experimental observation that the sudden change in volume of Mn3ZnN at about 127 K did not appear [Kim et al., Phys. Rev. B 68, 172402 (2003)].