A series of Li x CoPO4 (x =0.90, 0.95, 1, 1.05) compounds with different lithium content in the starting compositions were prepared by the sol–gel method. The phase identification was carried out by X-ray diffraction and neutron diffraction. The structure, atom positions, and occupancies were characterized by neutron diffraction. The morphology of Li x CoPO4 (x =0.90, 0.95, 1, 1.05) was examined by field emission scanning electron microscopy. Electrochemical analysis indicated that Li0.95CoPO4 presented the highest discharge capacity at various current densities among all the different x value compounds. The Li0.95CoPO4 showed better cycling stability and coulombic efficiency in the room temperature ionic liquid electrolyte ([C3mpyr][NTf2] containing 1M LiNTf2) at various current densities in the voltage range of 3.5–5.0V than in the conventional electrolyte (1M LiPF6 in ethylene carbonate:diethyl carbonate).