The aim of this work was to perform hydrothermal synthesis and study the electrochemical properties of LiNi0.8Co0.2-xMgxO2 (0 <= x <= 0.15) cathode material for lithium ion batteries. XRD, FE-SEM, and ICP-OES studies revealed that highly crystalline phases and stoichiometric compositions of LiNi0.8Co0.2-xMgxO2 were successfully synthesized. The electrochemical characteristics of LiNi0.8Co0.2-xMgxO2 compositions reveal that they have excellent capacity retention and rate capability. In particular, LiNi0.8Co0.2-xMgxO2, which presented outstandingly rate capacity (217 mAh g(-1) and 167 mAh g(-1) at 0.1 C and 10 C rate, respectively) at 27 degrees C. Study the stability and capacity retention of compositions at high potential in the wide voltage range from 2.7 to 4.5 V at 60 degrees C showed the initial discharge capacities of compositions x = 0.00, 0.01, 0.05, 0.1 and 0.15 for the first 20 cycles at 0.2 C reached 98%, 97%, 95%, 94% and 97%, respectively, and for subsequent 100 cycles at a rate of 0.5 C reached 81%, 79%, 73%, 80% and 93%, respectively. Results showed that LiNi0.8Co0.1Mg0.1O2 had excellent capacity retention during 100 cycles at 0.5 C, indicating that 10% doping of Mg was significantly appropriate to enhance cycling stability for the Ni-containing layered cathode at the high cut-off voltage and high temperature. A comparison between the electrochemical performance of LiNi0.8Co0.1Mg0.1O2 and various reported cathode materials for lithium ion batteries indicated the better or comparable performance of LiNi0.8Co0.1Mg0.1O2.