Here, we report experimental results on the effects of composition on the structure of quaternary CaO–MgO–Al 2 O 3 –SiO 2 (CMAS) glasses in diopside (CaMgSi 2 O 6 ) and Ca-tschermakite (CaAl 2 SiO 6 ) join and glass in the diopside–anorthite eutectic composition (Di 64 An 36 )—model systems for basaltic melts—using multi-nuclear solid-state NMR. The 27 Al 3QMAS NMR spectra of CMAS glasses in diopside–Ca-tschermakite join show predominant [4] Al and a non-negligible fraction of [5] Al. The fraction of [5] Al species increases with increasing mole fraction of diopside (X Diopside ). The structurally relevant quadrupolar coupling constant of [4] Al in the glasses decreases with increasing X Diopside , suggesting a decrease in network distortion around [4] Al. Approximately 3.3% of [5] Al is observed for Di 64 An 36 glass, consistent with a previous study (Xue and Kanzaki, 2007). There are also non-negligible fraction of Al–O–Al and significant fractions of Si–O–Al in Di 64 An 36 glass, indicating extensive mixing between Si and Al and violation of the Al-avoidance in basaltic glasses. The 17 O 3QMAS NMR spectra of CMAS glasses show that three types of bridging oxygens (BO, Si–O–Si, Al–O–Al, and Si–O–Al) and two types of non-bridging oxygens (NBO, Ca–NBO, and mixed {Ca,Mg}–NBO) are partially resolved. The fraction of NBO in the basaltic glasses decreases with decreasing X Diopside . A presence of the prominent 3 Ca–NBO peak (NBO surrounded by three Ca 2+ cations) in the CMAS glass at an intermediate compositions (X Diopside =0.5) suggests non-random distributions of Ca 2+ and Mg 2+ around NBOs and BOs, characterized either by preferential partitioning of Ca 2+ into NBOs and/or structural arrangement toward unmixing of Ca 2+ and Mg 2+ around NBO.The observed structural changes in the CMAS glasses can provide an improved understanding of their structure–property relationships. The predominance of [4] Al and its extensive mixing with [4] Si is consistent with the negative enthalpy of mixing for CMAS glasses obtained by solution calorimetry. The observed increase in NBO fraction (as also expected from the chemical composition) with increasing X Diopside indicates an obvious decrease in melt viscosity toward a diopside endmember. The partitioning of Ca 2+ and Mg 2+ and/or unmixing of these cations between NBOs and BOs may result in variations in the activity coefficients of CaO and MgO, thus the compositions of melts.