Studies have shown that immune-related genes play a crucial role in tumor development and treatment. However, the specific roles and potential value of these genes in lung cancer patients are still not fully understood. Therefore, this study aims to establish a novel risk model based on immune-related genes for evaluating the prognostic risk and response to immune therapy in lung cancer patients. Gene expression and clinical data of lung cancer patients were retrieved from the Cancer Genome Atlas (TCGA) and the Gene Expression Omnibus (GEO) databases, while immune-related genes were obtained from the ImmPort database. A risk signature model was developed using univariate Cox analysis and LASSO regression analysis. The prognostic value of the model and its response to immunotherapy were analyzed by survival analysis, immune infiltration analysis and immunotherapy response analysis. We have developed a risk signature model based on eight key immune-related genes, which can classify patients into high-risk and low-risk groups. The prognosis of the high-risk group was significantly lower than that of the low-risk group and was validated in multiple GEO datasets. The mutation frequency was lower in the low-risk group compared to the high-risk group (TP53: 55% vs 65%; TTN: 52% vs 60%; CSMD3: 34% vs 45%). Futhermore, CD274 expression was lower in the low-risk patients, and the high-risk patients in the IMvigor210 cohort had lower survival. Immune infiltration analyses showed that the high-risk group was negatively correlated with the infiltration level of B cells, CD4+ T cells, and NK cells. Importantly, patients in the low-risk group exhibit significantly lower TIDE scores, suggesting that they are more responsive to immunotherapy. Our study has established a novel and robust immune-related gene risk model that can assist in evaluating the prognostic risk and immune therapy response of lung cancer patients.