Due to domestication, the genetic diversity in cultivated rice is lower than that of wild rice species. Recent progress in sequencing the genomes of wild and cultivated rice genus is an important step in identifying their genetic differences associated with abiotic and biotic stresses-resistant ability. Thus, in this study, heat shock transcription factor (Hsf) genes in 6 wild rice accessions, including Oryza barthii, Oryza glumaepatula, Oryza meridionalis, Oryza nivara, Oryza punctate and Oryza rufipogon, and 1 cultivated rice variety Nipponbare were firstly identified, and the evolution of rice Hsf genes were analyzed. Totally, 22, 23, 24, 24, 25, 25 and 25 Hsf genes were identified in the 7 tested rice genomes, Oryza barthii, Oryza glumaepatula, Oryza meridionalis, Oryza nivara, Oryza punctate, Oryza rufipogon and Oryza sativa, respectively. The evolutionary analysis of Hsf genes revealed that Oryza rufipogon was the immediate ancestral progenitor of Oryza sativa. The variation in the number of Hsf genes between wild and cultivated rice genotypes was mainly due to segmental duplication and whole genome duplication (WGD) events, which might contribute to the different stress-tolerant ability between the wild and cultivated rice varieties. Secondly, the function of the Hsf genes in wild and cultivated rice in response to salinity stress was compared. Under salt stress, four Hsf genes, HsfA2b, HsfB4b, HsfB4c and HsfB4d, were exclusively down-regulated in Oryza rufipogon shoots. Whilst, another four Hsf genes, HsfA7a, HsfB2c, HsfC1b and HsfC2b, were up-regulated in the shoots of both the cultivated rice and its ancestral progenitor Oryza rufipogon. Meanwhile, genomic comparison results showed that 1, 1, 5 and 5 nsSNPs were detected in these 4 Hsf genes respectively, which might alter the functions of these genes. RT-qPCR results further confirmed the expression profile of one of these 4 Hsf genes, HsfB2c. The expression pattern of this gene in the cultivated rice variety in response to salt stress was similar with the previously known salt stress-tolerant gene, WRKY28. This indicated that these 4 Hsf genes might be among the conserved genes related to salt stress tolerance in the wild and cultivated rice. In summary, these results provide novel clues to the further functional studies of Hsf genes in rice for breeding programs.