The catalytic activity of cerium dioxide can be modified by deposition of alkaline earth oxide layers or nanoparticles or by substitutional doping of metal cations at the Ce site in ceria. In order to understand the effect of Mg oxide deposition and doping, a combination of experiment and first principles simulations is a powerful tool. In this paper, we examine the interaction of Mg with the ceria (111) surface using both angle resolved X-ray (ARXPS) and resonant (RPES) photoelectron spectroscopy measurements and density functional theory (DFT) corrected for on-site Coulomb interactions (DFT + U). With DFT + U, we also examine the interaction of Mg with the ceria (110) surface. The experiments show that upon deposition of Mg, Ce ions are reduced to Ce3+, while Mg is oxidised. When Mg is incorporated into ceria, no reduced Ce3+ ions are found and oxygen vacancies are present. The DFT + U simulations show that each Mg that is introduced leads to formation of two reduced Ce3+ ions. When Mg is incorporated at a Ce site in the (111) surface, one oxygen vacancy is formed for each Mg to compensate the different valencies, so that all Ce ions are oxidised. The behaviour of Mg upon interaction with the (110) surface is the same as with the (111) surface. The combined results provide a basis for deeper insights into the catalytic behaviour of ceria-based mixed oxide catalysts.