Sodium-ion batteries have become a potential alternative to Li-ion batteries due to the abundance of sodium resources. Sodium-ion cathode materials have been widely studied with particular focus on layered oxide lithium analogues. Generally, the capacity is limited by the redox processes of transition metals. Recently, however, the redox participation of oxygen gained a lot of research interest. Here the Mg-doped cathode material P2-Na 0.56 Mg 0.04 Ni 0.19 Mn 0.70 O 2 is studied, which is shown to exhibit a good capacity (ca. 120 mAh/g) and high average operating voltage (ca. 3.5 V vs. Na + /Na). Due to the Mg-doping, the material exhibits a reversible phase transition above 4.3 V, which is attractive in terms of lifetime stability. In this study, we combine X-ray photoelectron spectroscopy, X-ray absorption spectroscopy and resonant inelastic X-ray scattering spectroscopy techniques to shed light on both, cationic and anionic contributions towards charge compensation.