High mobility group protein A2 (HMGA2) and octamer-binding transcription factor 4 (Oct4) are transcription factors that play major roles in the acquisition of cancer stemness phenotypes and tumorigenicity of malignant neoplasms. The aim of this study was to analyze the association between HMGA2 and Oct4 expression and various clinicopathologic features in gastric cancer patients including invasion, metastasis, and clinical prognosis, in addition to overall survival. Immunohistochemistry was performed to explore the expression of HMGA2 and Oct4 in 158 gastric cancer and surrounding non-tumor tissues. Moreover, HMGA2 and Oct4 mRNA and protein levels were also detected by qRT-PCR and Western blotting, respectively, in 86 clinical tissue specimens and various gastric epithelial cell lines (GES-1, SGC7901, MKN45, and MKN27). Finally, associations between HMGA2 and Oct4 expression and clinicopathological features were analyzed by Pearson correlation coefficient. Survival analysis was performed by univariate and multivariate analyses. Taken together, we found that HMGA2 and Oct4 expression was significantly higher in gastric cancer tissues compared with non-cancerous tissues (P < 0.01), and HMGA2 and Oct4 protein levels were significantly higher in poorly differentiated gastric cancer cell lines (MKN45), moderately differentiated cell lines (SGC7901), and well-differentiated cell lines (MKN28) compared with human immortalized gastric epithelial cell lines (GES-1) (P < 0.01). Elevated HMGA2 and Oct4 levels were significantly associated with poor clinical prognosis (P < 0.05). Further conclusion showed that coexpression of HMGA2 and Oct4 in gastric cancer correlated with tumor invasion, metastasis, and clinical prognosis and predicted an unfavorable clinical outcome. These transcription factors may represent useful biomarkers to identify patients at high risk of postoperative recurrence.