Mammaglobin B, also referred to as secretoglobin family 2A member 1 (SCGB2A1), has been reported to be highly expressed in uterine corpus endometrial cancer (UCEC) compared with in the normal endometrium. However, the prognostic value of SCGB2A1 in UCEC remains unclear. The Oncomine, The Cancer Genome Atlas (TCGA) and Clinical Proteomic Tumor Analysis Consortium databases were used to explore the differential expression of SCGB2A1. Furthermore, data of patients with UCEC were downloaded from TCGA, and logistic regression analysis, survival analysis, univariate and multivariate analyses, and nomogram construction were performed to identify its prognostic value in UCEC. Additionally, gene set enrichment analysis (GSEA) was utilized to estimate the mechanisms of SCGB2A1 in UCEC. Finally, immune infiltration of SCGB2A1 in UCEC was analyzed using the Tumor Immune Estimation Resource. Decreased mRNA and protein expression levels of SCGB2A1 were significantly associated with poor prognostic clinicopathological characteristics (all P<0.05). Additionally, low expression levels of SCGB2A1 were associated with decreased survival of patients with UCEC compared with high expression levels of SCGB2A1. Furthermore, the independent prognostic value of SCGB2A1 in UCEC was identified by univariate and multivariate analyses. A nomogram based on 6 variables, including SCGB2A1 expression, was developed for the estimation of the 1-, 3-, and 5-year survival probability in UCEC. Additionally, GSEA suggested that the vascular endothelial growth factor, PTEN, platelet-derived growth factor, DNA repair, KRAS signaling, and PI3K-AKT-mTOR signaling pathways were differentially enriched in the low SCGB2A1 expression phenotype. Finally, high infiltration levels of CD8 + T cells were associated with SCGB2A1 in UCEC and this was associated with prognosis. The present results indicated that SCGB2A1 may be a promising independent prognostic factor in UCEC. These signaling pathways may be crucial for the regulation of UCEC via SCGB2A1.