ABSTRACT: Immune-related genes play a significant role in predicting the overall survival and monitoring the status of the cancer immune microenvironment. The aim of this research study was to identify differentially expressed immune-related genes (DEIRGs) and establish a Cox prediction model for the evaluation of prognosis in patients with non-small cell lung cancer (NSCLC). Transcription expression data, immune gene data, and tumor transcription factor data from The Cancer Genome Atlas (TCGA), the Immunology Database and Analysis Portal, and the Cistrome Cancer database were analyzed to detect differentially expressed genes (DEGs), DEIRGs, and differentially expressed transcription factors (DETFs). Multivariate Cox regression analysis was used to obtain potential DEIRGs as independent prognostic factors. Oncomine, The Human Protein Atlas (HPA), TIMER databases were performed to validate the mRNA and protein expression level of DEIRGs. TIMER database was performed to explore the immunocytes infiltration of DEIRGs. In total, 7448 DEGs, 536 DEIRGs, 87 DETFs were identified from 1,037 NSCLC tissues and 108 normal tissues in TCGA database. Fifteen-DEIRG signatures (THBS1, S100P, S100A16, DLL4, CD70, DKK1, IL33, NRTN, PDGFB, STC2, VGF, GCGR, HTR3A, LGR4, SHC3) could be perceived as independent prognostic factors for predicting the overall survival of patients with NSCLC (P = 4.89e--09). Immune cell correlation analysis showed that neutrophils and b cells were positively and negatively correlated with the riskscore of the prediction model, respectively. Our study identified a Cox prediction model based on DEIRGs to predict the overall survival of patients with NSCLC. The immunocyte infiltration analysis provided a novel horizon for monitoring the status of the NSCLC immune microenvironment.