Core–shell LiFePO4/C nanocomposite has been prepared by a sol–gel method. The mean size of the spherical core LiFePO4 is about 30nm, and thickness of carbon shell is about 3nm. The bonding character on the interface of core–shell was revealed by soft X-ray absorption spectroscopy (XAS). The as-prepared sample was characterized by X-ray diffraction (XRD), Raman spectrum, Transmission electron microscope (TEM) and High-resolution transmission electron microscopy (HRTEM). Charge-discharge tests show the core–shell LiFePO4/C demonstrates high rate capability (106mAhg−1 at 20C) and good cycling performance (negligible capacity loss after 250 cycles).