The ground-state structure of magnesium tetrahydroborate, Mg(BH4)(2), is still under debate. The experimentally and theoretically proposed structures mismatch, and even among the computationally determined structures a disagreement still exists. The main debated question is related to the lattice stability of the proposed structures. We combined several computational methods to build and compute the lowest energy structure. We found that the building motif of the crystalline structure of alkali and earth-alkaline metal tetrahydroborates is dictated by the coordination of metal atom. We report here the case of Mg(BH4)(2).