Li2Fe0.97Mg0.03SiO4 and Li2FeSiO4 have been synthesized via a sol–gel method. The effects of Mg doping on the characteristics of Li2FeSiO4 are investigated. Both Li2Fe0.97Mg0.03SiO4 and Li2FeSiO4 have a monoclinic structure (space group: P21) and their lattice parameters are similar, which indicates that Mg2+ has been doped into the structure of Li2FeSiO4 without destroying its lattice structure. Mg doping improves the discharge capacity and cycle stability of Li2FeSiO4. Electrochemical impedance analysis shows that Mg doping decreases charge transfer resistance of Li2FeSiO4, and moreover, Mg doping increases the lithium ion diffusion coefficient of Li2FeSiO4 by one order of magnitude. Compared with Li2FeSiO4, the higher lithium ion diffusion capability of Li2Fe0.97Mg0.03SiO4 results in its higher reversible capacity, especially at high rates. Furthermore, Mg2+ is unchangeable during cycling, which stabilizes the crystal structure and results in higher cycle stability of Li2Fe0.97Mg0.03SiO4.