Mg2NiN2 crystallizes in the monoclinic C2/m space group. There are two inequivalent Mg sites. In the first Mg site, Mg(1) is bonded to two equivalent N(2) and three equivalent N(1) atoms to form distorted MgN5 square pyramids that share corners with two equivalent Mg(1)N5 square pyramids, corners with two equivalent Mg(2)N4 trigonal pyramids, edges with three equivalent Mg(1)N5 square pyramids, and edges with four equivalent Mg(2)N4 trigonal pyramids. In the second Mg site, Mg(2) is bonded to two equivalent N(1) and two equivalent N(2) atoms to form MgN4 trigonal pyramids that share corners with two equivalent Mg(1)N5 square pyramids, corners with two equivalent Mg(2)N4 trigonal pyramids, edges with four equivalent Mg(1)N5 square pyramids, and  an edgeedge with one Mg(2)N4 trigonal pyramid. Ni(1) is bonded in a distorted trigonal planar geometry to one N(1) and two equivalent N(2) atoms. There are two inequivalent N sites. In the first N site, N(1) is bonded to two equivalent Mg(2), three equivalent Mg(1), and one Ni(1) atom to form NMg5Ni octahedra that share corners with two equivalent N(2)Mg4Ni2 octahedra, corners with two equivalent N(1)Mg5Ni octahedra, edges with three equivalent N(1)Mg5Ni octahedra, and edges with five equivalent N(2)Mg4Ni2 octahedra. The corner-sharing octahedral tilt angles range from 3-37°. In the second N site, N(2) is bonded to two equivalent Mg(1), two equivalent Mg(2), and two equivalent Ni(1) atoms to form distorted NMg4Ni2 octahedra that share corners with two equivalent N(2)Mg4Ni2 octahedra, corners with two equivalent N(1)Mg5Ni octahedra, edges with two equivalent N(2)Mg4Ni2 octahedra, and edges with five equivalent N(1)Mg5Ni octahedra. The corner-sharing octahedral tilt angles range from 3-37°.
Mg2NiN2 crystallizes in the monoclinic C2/m space group. There are two inequivalent Mg sites. In the first Mg site, Mg(1) is bonded to two equivalent N(2) and three equivalent N(1) atoms to form distorted MgN5 square pyramids that share corners with two equivalent Mg(1)N5 square pyramids, corners with two equivalent Mg(2)N4 trigonal pyramids, edges with three equivalent Mg(1)N5 square pyramids, and edges with four equivalent Mg(2)N4 trigonal pyramids. There is one shorter (2.27 Å) and one longer (2.54 Å) Mg(1)-N(2) bond length. There are two shorter (2.11 Å) and one longer (2.28 Å) Mg(1)-N(1) bond length. In the second Mg site, Mg(2) is bonded to two equivalent N(1) and two equivalent N(2) atoms to form MgN4 trigonal pyramids that share corners with two equivalent Mg(1)N5 square pyramids, corners with two equivalent Mg(2)N4 trigonal pyramids, edges with four equivalent Mg(1)N5 square pyramids, and  an edgeedge with one Mg(2)N4 trigonal pyramid. There is one shorter (2.11 Å) and one longer (2.22 Å) Mg(2)-N(1) bond length. Both Mg(2)-N(2) bond lengths are 2.14 Å. Ni(1) is bonded in a distorted trigonal planar geometry to one N(1) and two equivalent N(2) atoms. The Ni(1)-N(1) bond length is 1.88 Å. There is one shorter (1.82 Å) and one longer (1.92 Å) Ni(1)-N(2) bond length. There are two inequivalent N sites. In the first N site, N(1) is bonded to two equivalent Mg(2), three equivalent Mg(1), and one Ni(1) atom to form NMg5Ni octahedra that share corners with two equivalent N(2)Mg4Ni2 octahedra, corners with two equivalent N(1)Mg5Ni octahedra, edges with three equivalent N(1)Mg5Ni octahedra, and edges with five equivalent N(2)Mg4Ni2 octahedra. The corner-sharing octahedral tilt angles range from 3-37°. In the second N site, N(2) is bonded to two equivalent Mg(1), two equivalent Mg(2), and two equivalent Ni(1) atoms to form distorted NMg4Ni2 octahedra that share corners with two equivalent N(2)Mg4Ni2 octahedra, corners with two equivalent N(1)Mg5Ni octahedra, edges with two equivalent N(2)Mg4Ni2 octahedra, and edges with five equivalent N(1)Mg5Ni octahedra. The corner-sharing octahedral tilt angles range from 3-37°.