Thermosensitive genic male-sterile (TGMS) lines, which are male-sterile at restrictive (high) temperatures but male-fertile at permissive (low) temperatures, have been widely used in breeding two-line hybrid rice (Oryza sativa L.). Here we find that mutation of thermosensitive genic male sterile 5 (tms5) in rice causes the TGMS trait through a loss of RNase Z(S1) function. We show that RNase Z(S1) processes the mRNAs of three ubiquitin fusion ribosomal protein L40 (UbL40) genes into multiple fragments in vitro and in vivo. In tms5 mutants, high temperature results in increased levels of UbL40 mRNAs. Overaccumulation of UbL40 mRNAs causes defective pollen production and male sterility. Our results uncover a novel mechanism of RNase Z(S1)-mediated UbL40 mRNA regulation and shows that loss of this regulation produces TGMS in rice, a finding with potential applications in hybrid crop breeding.