A series of LixCoPO4 (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 LixCoPO4 (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 1 M LiNTf2) at various current densities in the voltage range of 3.5–5.0 V than in the conventional electrolyte (1 M LiPF6 in ethylene carbonate:diethyl carbonate).