MgFe2O4 (MFO) was prepared by a simple coprecipitation method followed by subsequently calcining at 600°C, and carbon-coated MFO (MFO/C) was obtained at 550°C using pyrrole as carbon source. The MFO/C used as anode material for rechargeable lithium-ion battery delivers a reversible capacity of 744.0mAhg−1 after 160 cycles at a current density of 100mAg−1, while the carbon-coated Fe3O4 (FO/C) prepared under the same condition exhibits a gradually declined capacity to 476.7mAhg−1 after cycling 95 times. The reversible capacities of MFO/C at the rates of 200, 400, 800, 1600, 3200, 6400mAg−1 are 612.7, 570.5, 529.5, 466.6, 355.6, and 216.9mAhg−1, also much higher than those of FO/C measured at the corresponding rates. The excellent electrochemical performance of MFO/C is associated with the smaller grain size of MFO, the nitrogen-doped carbon coating, the formation of MgO as a dispersant during charging/discharging to prevent Fe and its oxides from agglomeration and to buffer large volume change.