The mixed alkaline earth effect (MAEE) is important for several families of industrial borosilicate and aluminosilicate glasses, including glasses used in pharmaceutical packaging and as substrates for flat panel displays. Despite the technological importance of the mixed alkaline earth effect, the physical origin of this phenomenon is not well understood, and there is currently no model to offer quantitative prediction of the effect. In this work, the MAEE is studied both experimentally and through modeling in a series of boroaluminosilicate glasses with systematic substitution of CaO with MgO. The network structure is characterized by magic angle spinning nuclear magnetic resonance (MAS NMR) analyses of 27Al, 11B, 29Si, and 23Na. Molecular dynamics (MD) simulations are conducted to simulate the glass structures and calculate the evolution of the bond angle distributions with composition. Based on the structural data, a topological constraint model is proposed to capture the MAEE on glass transition temperature (Tg), liquid fragility index (m), and Young's modulus (E) of the glasses. Results of the topological constraint model are in good quantitative agreement with experimental data. The success of the constraint model confirms that the mixed alkaline earth effect is the result of a shift in angle around oxygen in the cation-oxygen-cation bond in the glass network. This is related to the constraint strength that ultimately governs the nonlinear property variation.