An evolutionary composite of LiFePO4 with nitrogen and boron codoped carbon layers was prepared by processing hydrothermal-synthesized LiFePO4. This novel codoping method is successfully applied to LiFePO4 for commercial use, and it achieved excellent electrochemical performance. The electrochemical performance can be improved through single nitrogen doping (LiFePO4/C-N) or boron doping (LiFePO4/C-B). When modifying the LiFePO4/C-B with nitrogen (to synthesis LiFePO4/C-B+N) the undesired nonconducting N-B configurations (190.1 and 397.9 eV) are generated. This decreases the electronic conductivity from 2.56×10(-2) to 1.30×10(-2) S cm(-1) resulting in weak electrochemical performance. Nevertheless, using the opposite order to decorate LiFePO4/C-N with boron (to obtain LiFePO4/C-N+B) not only eliminates the nonconducting N-B impurity, but also promotes the conductive C-N (398.3, 400.3, and 401.1 eV) and C-B (189.5 eV) configurations-this markedly improves the electronic conductivity to 1.36×10(-1) S cm(-1). Meanwhile the positive doping strategy leads to synergistic electrochemical activity distinctly compared with single N- or B-doped materials (even much better than their sum capacity at 20 C). Moreover, due to the electron and hole-type carriers donated by nitrogen and boron atoms, the N+B codoped carbon coating tremendously enhances the electrochemical property: at the rate of 20 C, the codoped sample can elevate the discharge capacity of LFP/C from 101.1 mAh g(-1) to 121.6 mAh g(-1), and the codoped product based on commercial LiFePO4/C shows a discharge capacity of 78.4 mAh g(-1) rather than 48.1 mAh g(-1). Nevertheless, the B+N codoped sample decreases the discharge capacity of LFP/C from 101.1 mAh g(-1) to 95.4 mAh g(-1), while the commercial LFP/C changes from 48.1 mAh g(-1) to 40.6 mAh g(-1).