For improving the electrochemical performance and thermal stability, magnesium was chosen as the doping element in Li(NiCoMn)O2 cathode materials. LiNi0.6−x Mg x Co0.25Mn0.15O2 (x =0 and 0.03) were successfully synthesized via the mixing hydroxide method. These materials exhibited α-NaFeO2 structure as indicated by the XRD patterns. The intensity ratio of (003) to (104) showed that the Mg substitution could reduce the cation mixing. The pristine material exhibited the initial discharge of capacity 199mAhg−1 and remained retention of 79% after 20 cycles in the voltage range of 3–4.5V. When magnesium ions were substituted, the initial capacity was reduced due to the less active ions. However, the capacity retention was increased to 95%. Not only cycleability, but also the thermal stability was improved by Mg substitution at every delithiated state of electrodes with electrolytes. The in situ synchrotron X-ray diffraction patterns showed that the boundary of phase transition for H1 to H2 was much clearer in Mg-doped sample, indicating that the LiNi0.57Mg0.03Co0.25Mn0.15O2 material exhibited higher structural integrity. The improvements of both electrochemical retention and thermal stability were possibly attributed to the reduced cation mixing and complete structural changes.