The behavior of Mg surfaces upon exposure to water and oxygen is not yet completely understood in spite of its relevant technological interest . We present the results of first-principle simulations, within density-functional theory, of the core-level photoelectron spectra for models of Mg (0001) surfaces after exposure to water and/or oxygen. Our results show that simple models for water adsorption on Mg(0001) do not explain the observed structure of the peaks. In particular, neither the adsorption of water molecules over outer Mg atoms nor the adsorption of hydroxyls OH groups over Mg atoms of the second layer explain the structure of the spectra. Better results are obtained by considering hydroxyls bound to an oxidized MgO layer.