Heat shock factor 1 (HSF1) is a key regulator of the heat shock response and plays an important role in various cancers. However, the role of HSF1 in gastric cancer is still unknown. The present study evaluated the function of HSF1 and related mechanisms in gastric cancer. The expression levels of HSF1 in normal and gastric cancer tissues were compared using cDNA microarray data from the NCBI Gene Expression Omnibus (GEO) dataset. The proliferation of gastric cancer cells was analyzed using the WST assay. Transwell migration and invasion assays were used to evaluate the migration and invasion abilities of gastric cancer cells. Protein levels of HSF1 were analyzed using immunohistochemical staining of tissue microarrays from patients with gastric cancer. HSF1 expression was significantly higher in gastric cancer tissue than in normal tissue. Knockdown of HSF1 reduced the proliferation, migration, and invasion of gastric cancer cells, while HSF1 overexpression promoted proliferation, migration, and invasion of gastric cancer cells. Furthermore, HSF1 promoted the proliferation of gastric cancer cells in vivo. In Kaplan-Meier analysis, high levels of HSF1 were associated with poor prognosis for patients with gastric cancer (p=0.028). HSF1 may be closely associated with the proliferation and motility of gastric cancer cells and poor prognosis of patients with gastric cancer. Accordingly, HSF1 could serve as a prognostic marker for gastric cancer.