Endometrial cancer (EC) is a malignant tumor. Natural killer (NK) cells play a crucial role in various cancers, but their role in EC is unclear. To this purpose, in this paper, differential expression analysis was performed on transcriptome data from the TCGA database, and the obtained DEGs and the collected NRGs were intersected, and single-factor Cox regression analysis and Lasso-Cox regression analysis were performed on the intersected genes to obtain prognosis-related genes and risk model, respectively. These genes and models were validated by Kaplan-Meier (KM) survival curve analysis and ROC analysis on the internal and external test sets. In addition, nomogram models were constructed based on prognosis-associated genes, sample risk scores, and clinical factors. Finally, we explored the immune landscape of high- and low-risk groups of EC. The results showed that the risk models constructed in this paper exhibited excellent predictive effects, which will facilitate research on the precision treatment of EC. There were significant differences in prognosis, immune cell infiltration abundance, immune checkpoint-associated genes, and HLA gene expression between high- and low-risk groups of EC. The risk model in this paper can provide a reference for the personalized treatment of EC. In addition, we performed RT-qPCR to validate the levels of genes significantly associated with prognosis.