The olivine-type magnesium and fluorine co-doped LiFe0.92Mg0.08(PO4)0.99F0.03/C composites were prepared via a simple solid state reaction. The structure and morphology were characterized by XRD, SEM and EDS. The results present that the Mg and F were uniformly doped into the lattice of LiFePO4 without changing the structure and particle sizes. Compared to undoped LiFePO4/C, Mg doped LiFePO4/C and F doped LiFePO4/C, the co-doped LiFePO4/C shows the best electrochemical performance, especially at low temperature. The specific capacity of the LiFe0.92Mg0.08(PO4)0.99F0.03/C is 121, 109, 94 and 74mAhg−1 at the discharge rate of 0.1C, 1C, 2C, 5C under the temperature of −20°C. The co-doped sample also shows an outstanding cycling life at elevated temperature, which remains 94% of its initial capacity after 150 cycles at 60°C. The improved electrochemical performance is due to the increased electronic and ionic conductivity by co-doping with Mg and F.