A higher capacity and better cyclability are apparent when magnesium is introduced into the structure of LiCoO2 (y = 0.15). XRD analysis of LiMg y Co1−y O2 (y = 0, 0.1, 0.15), synthesized at 800 °C using a microwave assisted method, shows that the material is in the R-3m space group and to have a slightly expanded unit cell that increases with greater magnesium doping. Structural analysis by X-ray absorption spectroscopy (XAS) at the Co K-edge, L-edge and O K-edge shows that the magnesium is located in the transition metal layer rather than in the lithium layer and the charge balance results from the formation of oxygen vacancies rather than Co4+, while cobalt remains in the 3+ oxidation state. Interestingly, oxygen is found to participate in the charge compensation. Both magnesium, in the transition metal layer, and the Co-defect structure are attributed to the contribution towards structural stabilization of LiCoO2, thereby resulting in its enhanced electrochemical performance.