Using first-principles calculations within the generalized gradient approximation (GGA) +U framework, we inves- tigate the effect of C doping on the structural and electronic properties of LiFePO4. The calculated formation energies indicate that C doped at O sites is energetically favoured, and that C dopants prefer to occupy 03 sites. The band gap of the C doped material is much narrow than that of the undoped one, indicating better electro- conductive properties. To maintain charge balance, the valence of the Fe nearest to C appears as Fe3+, and it will be helpful to the hopping of electrons.