ABSTRACT Pure LiFePO4 and the nano-sized LiFe1−x Mg x PO4-C (x =0.00, 0.02, 0.04, 0.06 and 0.08) cathode materials have been prepared and investigated for Li-ion batteries. Samples were synthesized by handy and cheap sol–gel-assisted carbothermal reduction method. X-ray diffraction (XRD), field-emission scanning electron microscopy (FE-SEM), high resolution transmission electron microscopy (HR-TEM) and inductively coupled plasma (ICP) have been used to study the crystal structure, morphology and chemical composition of all produced materials. XRD findings reveal the slight decrease in crystal lattice of LiFePO4 after Mg2+ doping. Phase pure samples crystallize in the olivine-type structure with a linear relationship between lattice parameters (a, b and c) and chemical composition. The FE-SEM images have proved that Mg-doped particles are not agglomerated and the particle sizes (40–60nm) are able to compete with the literature. The synthesized small particles of the sol–gel-assisted carbothermal reduction process lead to a superior capacity in comparison to a common solid-state synthesis. For a Mg content of 0.04% the capacity is reached to a higher level (167mAhg−1) and good capacity retention of 97.0% over 300 cycles is observed. Although doping with Mg has a remarkable effect on improving its electronic or ionic mobility, but serious electrochemical degradation will occur when its doping density is beyond 0.04mol. The cycling voltammogram (CV) shows that Mg-doped LiFe0.96Mg0.04PO4-C electrode has improved electrical conductivity and diffusion coefficient of Li+ ions, in which Mg2+ is related to effectively act as a pillar in crystal lattice structure to prevent the collapse during lithium intercalation process.