O3-NaNi1/3Fe1/3Mn1/3O2 (NaNFM) materials are susceptible to complex phase transitions during electrical cycling leading to poor structural, capacity retention and multiplicity properties. These drawbacks hinder the application of NaNFM in sodium-ion batteries. Here, Mg2+ with larger ionic radius was used to dope its transition metal layer Ni site. The effects of Mg2+ doped NaNFM crystal structure and transition metal valence states on its electrochemical properties were investigated by XRD, SEM, and XPS. The capacity retention of NaNMFM-0.02 (84.05 %) was higher than that of NaNFM (73 %) after 200 cycles of the material at 5C. In addition, NaNMFM-0.02 achieved a first discharge specific capacity of 146.5 mAh/g at high voltage. Based on structural and electrochemical analyses, this improvement is attributed to the fact that magnesium acts as a “pillar” to stabilize the crystal structure of NaNFM, while magnesium doping reduces the Jahn-Teller effect. As a result, the material has better electrochemical properties.