The mechanism of MgO inhibiting phase precipitation and phase transformation of BaAl2Si2O8 in MgO−BaO−CaO−Al2O3−B2O3−SiO2 glass-ceramic is systematically investigated and analyzed. The molecular dynamics simulation results show that the addition of MgO makes the transformation of [BO3] to [BO4], bridge oxygen to non-bridge oxygen, and Qn distribution of [SiO4] tetrahedrons from Q3 to Q1, which is confirmed by infrared and Raman spectroscopy analysis of melt-quenched glass. Consequently, the precipitation process of the BaAl2Si2O8 phase is inhibited by the silicate structure transformation from metasilicate (SiO3)2− to pyrosilicate (Si2O7)6− to protosilicate (SiO4)4−, resulting in the BaAl2Si2O8 phase is gradually replaced with MgSiO3, Mg2SiO4, BaMgSiO4, Ba2MgSi2O7 and BaCa2Mg(SiO4)2 phase with increment of the MgO in the MBCASB glass. It means that the Mg ions are more competitive reacting with silicate structure to form the new crystalline phase than Al and Ba ions.