Hybrid rice, widely planted in Asia, is pathogen resistant and has superior yields, making it a major contributor to global food security. The two-line hybrid rice system, which utilizes mutants exhibiting photo-/thermo-sensitive genic male sterility (P/TGMS), is the leading hybrid rice breeding technology. Mutations in THERMO-SENSITIVE GENIC MALE STERILE 5 (TMS5) accounts for over 95% of current TGMS lines. We previously found that tms5 carries a mutation in ribonuclease ZS1. Despite its importance for breeding robust rice lines, the mechanism underlying tms5-mediated TGMS remains elusive. Here, we demonstrate that TMS5 is a tRNA 2',3'-cyclic phosphatase. The tms5 mutation leads to accumulation of 2',3'-cyclic phosphate (cP)-ΔCCA-tRNAs (tRNAs without 3'CCA ended with cP), which is exacerbated by high temperatures, and reduction in the abundance of mature tRNAs, particularly alanine tRNAs (tRNA-Alas). Overexpression of tRNA-Alas in the tms5 mutant restores male fertility to 70%. Remarkably, male fertility of tms5 mutant is completely restored at high temperatures by knocking out OsVms1 which encodes the enzyme for cP-ΔCCA-tRNA generation. Our study reveals the mechanism underlying tms5-mediated TGMS in rice and provides mechanistic insight into the further improvement of TGMS in hybrid crop development.