Heat-shock factors (HSFs) are key transcriptional regulators in cell survival. Although HSF1 has been identified as a driver of carcinogenesis, HSF2 has not been explored in malignancies. Here, we report that HSF2 suppresses tumor invasion of prostate cancer (PrCa). In three-dimensional organotypic cultures and the in vivo xenograft chorioallantoic membrane model HSF2 knockdown perturbs organoid differentiation and promotes invasiveness. Gene expression profiling together with functional studies demonstrated that the molecular mechanism underlying the effect on tumor progression originates from HSF2 steering the switch between acinar morphogenesis and invasion. This is achieved by the regulation of genes connected to, for example, GTPase activity, cell adhesion, extracellular matrix and actin cytoskeleton dynamics. Importantly, low HSF2 expression correlates with high Gleason score, metastasis and poor survival of PrCa patients, highlighting the clinical relevance of our findings. Finally, the study was expanded beyond PrCa, revealing that the expression of HSF2 is decreased in a wide range of cancer types. This study provides the first evidence for HSF2 acting as a suppressor of invasion in human malignancies.