Objective RAD51 is a DNA repair protein, which participates in the resistance of tumor cells to radiotherapy/chemotherapy and reduces the therapeutic effect. Based on the research status of RAD51 at home and abroad and the analysis of online databases, the purpose of this study was to explore the relationship between RAD51 expression and clinical patient survival and prognosis. It is expected to provide a new theoretical basis for the clinical treatment of lung cancer patients, help identify new molecular markers, and provide new targets for the biological therapy of lung cancer patients. Methods the RNA Seq data of NSCLC in TCGA database were downloaded, and the expression of RAD51 gene in NSCLC and normal tissues were analyzed by R studio software. Clinical correlation analysis revealed its correlation with the clinicopathological characteristics of non-small cell lung cancer. Survival analysis was used to evaluate the relationship between the expression level and the prognosis of patients. CIBERSORT and TIMER were used to evaluate the correlation between the expression level of CIBERSORT and immune cells in the tumor microenvironment. The protein expression level of RAD51 in non-small cell lung cancer was evaluated by HPA. Results RAD51 was highly expressed in lung cancer (p<0.05), which was significantly associated with poor prognosis of lung adenocarcinoma patients (p=0.0026), but not with lung squamous cell carcinoma (p=0.76). The expression level of RAD51 mRNA was associated with different pathological stages of lung adenocarcinoma (p=0.000528), but not with different pathological stages of lung squamous cell carcinoma (p=0.326). RAD51 was positively correlated with the expression of TP53, BRAF, EGFR, MYC, PD-L1, and KRAS (p<0.001). In lung adenocarcinoma, lung cancer cells were positively correlated with CD4+memory T cells, CD8+T cells, and M1 macrophages (p<0.001). In lung squamous cell carcinoma, tumor cells were positively correlated with M1 macrophages (p<0.05), but not with CD4+T memory cells, CD8+T cells, M2 macrophages, and Tregs cells (p>0.05). The HPA database indicated that RAD51 protein was positive in non-small cell lung cancer. Conclusion RAD51 is highly expressed in non-small cell lung cancer and is associated with poor prognosis. RAD51 can be used as a biomarker related to the prognosis of non-small cell lung cancer and is expected to become a target for the diagnosis and treatment of non-small cell lung cancer.