In recent years, protein homeostasis imbalance caused by endoplasmic reticulum stress has become a major hallmark of cancer. Studies have shown that endoplasmic reticulum stress is closely related to the occurrence, development, and drug resistance of non-small cell lung cancer, however, the role of various endoplasmic reticulum stress-related genes in non-small cell lung cancer is still unclear. In this study, we established an endoplasmic reticulum stress scores based on the Cancer Genome Atlas for non-small cell lung cancer to reflect patient features and predict prognosis. Survival analysis showed significant differences in overall survival among non-small cell lung cancer patients with different endoplasmic reticulum stress scores. In addition, endoplasmic reticulum stress scores was significantly correlated with the clinical features of non-small cell lung cancer patients, and can be served as an independent prognostic indicator. A nomogram based on endoplasmic reticulum stress scores indicated a certain clinical net benefit, while ssGSEA analysis demonstrated that there was a certain immunosuppressive microenvironment in high endoplasmic reticulum stress scores. Gene Set Enrichment Analysis showed that scores was associated with cancer pathways and metabolism. Finally, weighted gene co-expression network analysis displayed that CAV1 was closely related to the occurrence of non-small cell lung cancer. Therefore, in order to further analyze the role of this gene, Chinese non-smoking females were selected as the research subjects to investigate the relationship between CAV1 rs3779514 and susceptibility and prognosis of non-small cell lung cancer. The results showed that the mutation of rs3779514 significantly reduced the risk of non-small cell lung cancer in Chinese non-smoking females, but no prognostic effect was found. In summary, we proposed an endoplasmic reticulum stress scores, which was an independent prognostic factor and indicated immune characteristics in the microenvironment of non-small cell lung cancer. We also validated the relationship between single nucleotide polymorphism locus of core genes and susceptibility to non-small cell lung cancer.