Mg3FeN3 crystallizes in the monoclinic P2_1/m space group. There are three inequivalent Mg sites. In the first Mg site, Mg(1) is bonded to one N(2), one N(3), and three equivalent N(1) atoms to form a mixture of corner and edge-sharing MgN5 square pyramids. In the second Mg site, Mg(2) is bonded to one N(1), one N(3), and three equivalent N(2) atoms to form a mixture of corner and edge-sharing MgN5 square pyramids. In the third Mg site, Mg(3) is bonded in a rectangular see-saw-like geometry to one N(1), one N(2), and two equivalent N(3) atoms. Fe(1) is bonded in a distorted trigonal planar geometry to one N(1), one N(2), and one N(3) atom. There are three inequivalent N sites. In the first N site, N(1) is bonded to one Mg(2), one Mg(3), three equivalent Mg(1), and one Fe(1) atom to form NMg5Fe octahedra that share corners with two equivalent N(1)Mg5Fe octahedra, corners with three equivalent N(3)Mg4Fe trigonal bipyramids, edges with two equivalent N(1)Mg5Fe octahedra, edges with four equivalent N(2)Mg5Fe octahedra, and edges with two equivalent N(3)Mg4Fe trigonal bipyramids. The corner-sharing octahedral tilt angles are 9°. In the second N site, N(2) is bonded to one Mg(1), one Mg(3), three equivalent Mg(2), and one Fe(1) atom to form NMg5Fe octahedra that share corners with two equivalent N(2)Mg5Fe octahedra,  a cornercorner with one N(3)Mg4Fe trigonal bipyramid, edges with two equivalent N(2)Mg5Fe octahedra, edges with four equivalent N(1)Mg5Fe octahedra, and edges with three equivalent N(3)Mg4Fe trigonal bipyramids. The corner-sharing octahedral tilt angles are 8°. In the third N site, N(3) is bonded to one Mg(1), one Mg(2), two equivalent Mg(3), and one Fe(1) atom to form distorted NMg4Fe trigonal bipyramids that share  a cornercorner with one N(2)Mg5Fe octahedra, corners with three equivalent N(1)Mg5Fe octahedra, corners with two equivalent N(3)Mg4Fe trigonal bipyramids, edges with two equivalent N(1)Mg5Fe octahedra, and edges with three equivalent N(2)Mg5Fe octahedra. The corner-sharing octahedral tilt angles range from 3-60°.
Mg3FeN3 crystallizes in the monoclinic P2_1/m space group. There are three inequivalent Mg sites. In the first Mg site, Mg(1) is bonded to one N(2), one N(3), and three equivalent N(1) atoms to form a mixture of corner and edge-sharing MgN5 square pyramids. The Mg(1)-N(2) bond length is 2.16 Å. The Mg(1)-N(3) bond length is 2.27 Å. There are two shorter (2.17 Å) and one longer (2.29 Å) Mg(1)-N(1) bond length. In the second Mg site, Mg(2) is bonded to one N(1), one N(3), and three equivalent N(2) atoms to form a mixture of corner and edge-sharing MgN5 square pyramids. The Mg(2)-N(1) bond length is 2.34 Å. The Mg(2)-N(3) bond length is 2.26 Å. All Mg(2)-N(2) bond lengths are 2.17 Å. In the third Mg site, Mg(3) is bonded in a rectangular see-saw-like geometry to one N(1), one N(2), and two equivalent N(3) atoms. The Mg(3)-N(1) bond length is 2.18 Å. The Mg(3)-N(2) bond length is 2.15 Å. Both Mg(3)-N(3) bond lengths are 2.18 Å. Fe(1) is bonded in a distorted trigonal planar geometry to one N(1), one N(2), and one N(3) atom. The Fe(1)-N(1) bond length is 1.83 Å. The Fe(1)-N(2) bond length is 1.82 Å. The Fe(1)-N(3) bond length is 1.78 Å. There are three inequivalent N sites. In the first N site, N(1) is bonded to one Mg(2), one Mg(3), three equivalent Mg(1), and one Fe(1) atom to form NMg5Fe octahedra that share corners with two equivalent N(1)Mg5Fe octahedra, corners with three equivalent N(3)Mg4Fe trigonal bipyramids, edges with two equivalent N(1)Mg5Fe octahedra, edges with four equivalent N(2)Mg5Fe octahedra, and edges with two equivalent N(3)Mg4Fe trigonal bipyramids. The corner-sharing octahedral tilt angles are 9°. In the second N site, N(2) is bonded to one Mg(1), one Mg(3), three equivalent Mg(2), and one Fe(1) atom to form NMg5Fe octahedra that share corners with two equivalent N(2)Mg5Fe octahedra,  a cornercorner with one N(3)Mg4Fe trigonal bipyramid, edges with two equivalent N(2)Mg5Fe octahedra, edges with four equivalent N(1)Mg5Fe octahedra, and edges with three equivalent N(3)Mg4Fe trigonal bipyramids. The corner-sharing octahedral tilt angles are 8°. In the third N site, N(3) is bonded to one Mg(1), one Mg(2), two equivalent Mg(3), and one Fe(1) atom to form distorted NMg4Fe trigonal bipyramids that share  a cornercorner with one N(2)Mg5Fe octahedra, corners with three equivalent N(1)Mg5Fe octahedra, corners with two equivalent N(3)Mg4Fe trigonal bipyramids, edges with two equivalent N(1)Mg5Fe octahedra, and edges with three equivalent N(2)Mg5Fe octahedra. The corner-sharing octahedral tilt angles range from 3-60°.