Temperature is a major factor that regulates plant growth and phenotypic diversity. To ensure reproductive success at a range of temperatures, plants must maintain developmental stability of their sexual organs when exposed to temperature fluctuations. However, the mechanisms integrating plant floral organ development and temperature responses are largely unknown. Here, we generated barley and rice loss-of-function mutants in the SEPALLATA-like MADS-box gene MADS8. The mutants in both species form multiple carpels that lack ovules at high ambient temperatures. Tissue-specific markers revealed that HvMADS8 is required to maintain floral meristem determinacy and ovule initiation at high temperatures, and transcriptome analyses confirmed that temperature-dependent differentially expressed genes in Hvmads8 mutants predominantly associate with floral organ and meristem regulation. HvMADS8 temperature-responsive activity relies on increased binding to promoters of downstream targets, as revealed by a cleavage under targets and tagmentation (CUT&Tag) analysis. We also demonstrate that HvMADS8 directly binds to two orthologs of D-class floral homeotic genes to activate their expression. Overall, our findings revealed a new, conserved role for MADS8 in maintaining pistil number and ovule initiation in cereal crops, extending the known function of plant MADS-box proteins in floral organ regulation.