First-principles computations were performed to investigate the performance of KTiOPO4 (KTP) as a cathode material for potassium-ion batteries (PIBs), including the stability and electronic properties of depotassiated structures and mechanisms of K deintercalation and diffusion. As depotassiation proceeds, oxygen hole polarons are produced, and there are not peroxides or superoxides formed after deep depotassiation. The anionic oxygen redox in KTP provides a voltage vs K/K+ over 4 V by the PBE+U method and over 5 V with the more reliable HSE06 hybrid functional. When all K in KTP is removed, the calculated volume compression is only 1.528%. The AIMD simulations at 300 K for TiOPO4 verify its thermal stability. The PBE+U calculations predict a low ion diffusion barrier of 0.29 eV in bulk KTP, indicating a good charge-discharge rate for KTP as a cathode for PIBs. All of the calculated results indicate that KTP can be a promising cathode material for PIBs.