In the scope of supporting the development of Mg-Al alloys and related materials, an experimental study coupled with a CALPHAD thermodynamic modeling of the Al-C-Mg system was conducted. The peritectic decomposition of Al2MgC2 to form Al4C3, graphite and a liquid phase was measured at 1559±10 K by DTA. In order to model the Mg solubility in Al4C3, DFT calculations were performed on the end-member phases Mg4C3, Al2Mg2C3 and Mg2Al2C3 and it was shown that Mg substitutes on the Al2 crystallographic site of the carbide structure. Based on recent literature data and a revised Al-C binary, a model description of the Al-C-Mg ternary is proposed for the first time. More specifically, it is used to calculate the liquidus projection and the phase formation sequence during Scheil solidification of a 91Mg-9Al wt% alloy inoculated with carbon. This work provides a convincing argument that Al2MgC2 is the nucleant responsible for the grain refinement of Mg-Al alloys inoculated by C.