MgEr2S4 is Spinel-like structured and crystallizes in the orthorhombic Pnma space group. Mg(1) is bonded to one S(2), one S(3), and two equivalent S(1) atoms to form MgS4 tetrahedra that share corners with two equivalent Er(1)S6 octahedra, corners with four equivalent Er(2)S6 octahedra,  an edgeedge with one Er(2)S6 octahedra, and edges with two equivalent Er(1)S6 octahedra. The corner-sharing octahedral tilt angles range from 60-66°. There are two inequivalent Er sites. In the first Er site, Er(1) is bonded to two equivalent S(1), two equivalent S(2), and two equivalent S(3) atoms to form ErS6 octahedra that share corners with four equivalent Er(2)S6 octahedra, corners with two equivalent Mg(1)S4 tetrahedra, edges with two equivalent Er(1)S6 octahedra, edges with two equivalent Er(2)S6 octahedra, and edges with two equivalent Mg(1)S4 tetrahedra. The corner-sharing octahedral tilt angles range from 50-54°. In the second Er site, Er(2) is bonded to one S(2), one S(3), and four equivalent S(1) atoms to form ErS6 octahedra that share corners with four equivalent Er(1)S6 octahedra, corners with four equivalent Er(2)S6 octahedra, corners with four equivalent Mg(1)S4 tetrahedra, edges with two equivalent Er(1)S6 octahedra, and  an edgeedge with one Mg(1)S4 tetrahedra. The corner-sharing octahedral tilt angles range from 47-54°. There are three inequivalent S sites. In the first S site, S(1) is bonded in a rectangular see-saw-like geometry to one Mg(1), one Er(1), and two equivalent Er(2) atoms. In the second S site, S(2) is bonded in a rectangular see-saw-like geometry to one Mg(1), one Er(2), and two equivalent Er(1) atoms. In the third S site, S(3) is bonded to one Mg(1), one Er(2), and two equivalent Er(1) atoms to form distorted corner-sharing SEr3Mg tetrahedra.
MgEr2S4 is Spinel-like structured and crystallizes in the orthorhombic Pnma space group. Mg(1) is bonded to one S(2), one S(3), and two equivalent S(1) atoms to form MgS4 tetrahedra that share corners with two equivalent Er(1)S6 octahedra, corners with four equivalent Er(2)S6 octahedra,  an edgeedge with one Er(2)S6 octahedra, and edges with two equivalent Er(1)S6 octahedra. The corner-sharing octahedral tilt angles range from 60-66°. The Mg(1)-S(2) bond length is 2.48 Å. The Mg(1)-S(3) bond length is 2.39 Å. Both Mg(1)-S(1) bond lengths are 2.46 Å. There are two inequivalent Er sites. In the first Er site, Er(1) is bonded to two equivalent S(1), two equivalent S(2), and two equivalent S(3) atoms to form ErS6 octahedra that share corners with four equivalent Er(2)S6 octahedra, corners with two equivalent Mg(1)S4 tetrahedra, edges with two equivalent Er(1)S6 octahedra, edges with two equivalent Er(2)S6 octahedra, and edges with two equivalent Mg(1)S4 tetrahedra. The corner-sharing octahedral tilt angles range from 50-54°. Both Er(1)-S(1) bond lengths are 2.76 Å. Both Er(1)-S(2) bond lengths are 2.72 Å. Both Er(1)-S(3) bond lengths are 2.68 Å. In the second Er site, Er(2) is bonded to one S(2), one S(3), and four equivalent S(1) atoms to form ErS6 octahedra that share corners with four equivalent Er(1)S6 octahedra, corners with four equivalent Er(2)S6 octahedra, corners with four equivalent Mg(1)S4 tetrahedra, edges with two equivalent Er(1)S6 octahedra, and  an edgeedge with one Mg(1)S4 tetrahedra. The corner-sharing octahedral tilt angles range from 47-54°. The Er(2)-S(2) bond length is 2.69 Å. The Er(2)-S(3) bond length is 2.71 Å. There are two shorter (2.76 Å) and two longer (2.80 Å) Er(2)-S(1) bond lengths. There are three inequivalent S sites. In the first S site, S(1) is bonded in a rectangular see-saw-like geometry to one Mg(1), one Er(1), and two equivalent Er(2) atoms. In the second S site, S(2) is bonded in a rectangular see-saw-like geometry to one Mg(1), one Er(2), and two equivalent Er(1) atoms. In the third S site, S(3) is bonded to one Mg(1), one Er(2), and two equivalent Er(1) atoms to form distorted corner-sharing SEr3Mg tetrahedra.