High hardness and high crack resistance are usually mutually exclusive in glass materials. Through the aerodynamic levitation and laser melting technique, we prepared a series of magnesium aluminosilicate glasses with a constant MgO content, and found a striking enhancement of both hardness and crack resistance with increasing Al2O3. The crack resistance of the magnesium aluminosilicate glass is about five times higher than that of the binary alumina-silica glass for the similar [Al]/([Al] + [Si]) molar ratio (around 0.6). For the selected magnesium aluminosilicate glass with R = 0.32, when subjected to isothermal treatment at 1283K, we observed a further drastic enhancement of both hardness and crack resistance by extending the heating time. Based on the structural analyses, we propose an atomic-scale model to explain the mechanism of synergetic enhancement in hardness and crack resistance for the magnesium aluminosilicate glasses and glass-ceramics.