An Mg–C composite, prepared by high energy mechanical milling, was investigated as an anode material for lithium-ion batteries. Electrochemical tests demonstrated that the first charge and discharge capacities were 1810 and 1433mAhg−1, respectively, with a coulombic efficiency for the first cycle of 80%. Ex situ XRD analyses combined with a differential capacity plot of the Mg–C composite electrode showed the phase changes during the electrochemical Li–Mg alloying/dealloying reaction. Significantly enhanced rate capability and reversibility of the electrochemical reaction of Mg with lithium were observed and the improvement in the electrochemical properties of the composite electrode was attributed to the high energy mechanical milling of Mg with carbon on the surface of the Mg–C composite.