Mg(BH4)2 crystallizes in the tetragonal I4_1/amd space group. The structure consists of a Mg(BH4)2 framework. There are two inequivalent Mg sites. In the first Mg site, Mg(1) is bonded to four equivalent H(2) and four equivalent H(3) atoms to form MgH8 hexagonal bipyramids that share edges with four equivalent B(1)H4 tetrahedra. In the second Mg site, Mg(2) is bonded in a body-centered cubic geometry to eight equivalent H(1) atoms. B(1) is bonded to one H(2), one H(3), and two equivalent H(1) atoms to form BH4 tetrahedra that share  an edgeedge with one Mg(1)H8 hexagonal bipyramid. There are three inequivalent H sites. In the first H site, H(2) is bonded in a distorted L-shaped geometry to one Mg(1) and one B(1) atom. In the second H site, H(3) is bonded in an L-shaped geometry to one Mg(1) and one B(1) atom. In the third H site, H(1) is bonded in a distorted L-shaped geometry to one Mg(2) and one B(1) atom.
Mg(BH4)2 crystallizes in the tetragonal I4_1/amd space group. The structure consists of a Mg(BH4)2 framework. There are two inequivalent Mg sites. In the first Mg site, Mg(1) is bonded to four equivalent H(2) and four equivalent H(3) atoms to form MgH8 hexagonal bipyramids that share edges with four equivalent B(1)H4 tetrahedra. All Mg(1)-H(2) bond lengths are 2.07 Å. All Mg(1)-H(3) bond lengths are 2.12 Å. In the second Mg site, Mg(2) is bonded in a body-centered cubic geometry to eight equivalent H(1) atoms. All Mg(2)-H(1) bond lengths are 2.11 Å. B(1) is bonded to one H(2), one H(3), and two equivalent H(1) atoms to form BH4 tetrahedra that share  an edgeedge with one Mg(1)H8 hexagonal bipyramid. The B(1)-H(2) bond length is 1.23 Å. The B(1)-H(3) bond length is 1.22 Å. Both B(1)-H(1) bond lengths are 1.22 Å. There are three inequivalent H sites. In the first H site, H(2) is bonded in a distorted L-shaped geometry to one Mg(1) and one B(1) atom. In the second H site, H(3) is bonded in an L-shaped geometry to one Mg(1) and one B(1) atom. In the third H site, H(1) is bonded in a distorted L-shaped geometry to one Mg(2) and one B(1) atom.