LiFePO4/C materials are synthesized via in-situ coating of LiFePO4 by using 1-butyl-3-methylimidazolium dicyanamide ([BMIm][N(CN)2]) and glucose as carbon sources, respectively. The structure characterization results indicate that the carbon sources have no effect on the LiFePO4 particles, but have remarkable influence on the coated carbon films. It is found that the [BMIm][N(CN)2] carbon source leads to ultrathin (1–2 nm), uniform and highly graphitized carbon films. Due to this unique structure, the electrode materials fabricated by using [BMIm][N(CN)2] exhibit a superior electrode reaction reversibility, a capacity retention of 160.6 mAhg−1 (1.47% decay rate) after 50 cycles and a specific discharge capacity of 143.6 mAhg−1 at 1C, which is much better than the performance of the electrode materials synthesized with glucose.