Doping is one of the most important methods to improve the electronic conductivity and modify its electrochemical performance of LiFePO
4. Rare earth elements have become an effective selection for doping modification due to their high electronic charges, large ion radii and strong self-polarization ability. In this work, we study the structural, electronic and ionic diffusion properties of LiFePO
4with rare earth (RE) doping (La, Ce, Pr) by using first-principles calculation based on density functional theory. The calculated results show that the lattice constant and cell volume of LiFePO
4increase to a different degree after RE doping. In the delithiation process, the volume change rate of the material after RE doping is significantly reduced, indicating the cycle performance of the material is improved, on the other hand, the energy density is reduced. The calculated density of states suggests that RE-doped LiFePO
4exhibits metallic characteristics, which is different from the undoped one with semiconductor characteristics. As a result, the RE-doping can increase the electronic conductivity of the material. The calculation of elastic modulus demonstrates the increase of ductility for RE-doped LiFePO
4, and it can be predicted that the cycle performance and the rate performance of the RE-doped battery have great improvement. In addition, La and Ce doped LiFePO
4materials exhibit that the complex energy barrier can change during the Li ion migration, and the migration barriers vary considerably, depending on different paths, which is related to the variation of potential energy surface caused by the doping of rare-earth elements. The Li-ions are far from the RE ions, the migration barriers are obviously lower than the undoped one, while the Li-ions are closest to RE ions, the migration barriers increase essentially. Compared with Ce doping, the change of the Li-ion migration barrier caused by La doping is great, indicating that RE ion doping has a greater influence on the local structure of the system.