Nanocrystalline LiFePO4 and doped LiTi0.01Fe0.99PO4 powders were synthesized via a sol-gel preparation route. High-resolution tunneling electron microscopy observation and energy dispersive spectroscopy, mapping show the homogeneous distribution of dopant Ti cations in the crystals. Fe and O K -edge X-ray absorption near-edge structure (XANES) measurements show that Ti4+ doping induces an increased unoccupied d-state in LiFePO4, resulting in an enhanced p-type semiconductivity. In situ Fe K -edge XANES measurements of Ti-doped and undoped LiFePO4 electrodes have been performed to determine the change of Fe valence during the lithium intercalation and de-intercalation processes. Both LiFePO4 and doped LiTi0.01Fe0.99PO4 cathodes demonstrate good electrochemical performance.