Previously, the measured synchrotron x-ray absorption near-edge spectroscopy (XANES) spectra of MgxZn1-xO alloy (MZO) samples were fitted by using two crystal structure models, i.e., four-fold wurtzite and six-fold rocksalt, with limited success [Appl. Phys. Lett. 99, 261901 (2011)]. For Zn K-edge, the two bases were sufficient for fitting the XANES spectra of intermediate alloy compositions; indicating that majority of the Zn atoms are either four-fold or six-fold coordinated. However, for Mg K-edge, clear deficiency of the fitting can be detected for the intermediate alloy compositions. In this work, first-principles calculations based on density functional theory were carried out to examine other plausible forms of Mg in the alloy. Based on our results, we suggested that the deficiency of the fitting results on Mg K-edge could be attributed to the formation of an unbuckled wurtzite (HX) structure, where Mg atoms are five-fold coordinated. For pure MgO, the HX structure was predicted to be stable under certain tensile strain conditions [Phys. Rev. B 77, 024104 (2008)].