Magnesium ferrite nanoparticles are prepared by a sol–gel method and characterized by X-ray diffraction, scanning electron microscopy and transmission electron microscopy. The electrochemical behavior as anode materials of lithium-ion rechargeable batteries is investigated by galvanostatic discharge/charge measurements and cyclic voltammetry. The average diameter of the MgFe2O4 particles is around 11nm. MgFe2O4 shows better performance than the traditional carbon material. The initial discharge specific capacity under the current density of 180mAg−1 reaches 1404mAhg−1, which is higher than that reported in literatures. After 50 cycles, the discharge and charge capacity of the MgFe2O4 under 90mAg−1 is 493 and 473.6mAhg−1, and the irreversible capacity loss is less than 5.2%.