BackgroundLung cancer is a common comorbidity of heart failure (HF). The early identification of the risk factors for lung cancer in patients with HF is crucial to early diagnosis and prognosis. Furthermore, oxidative stress and immune responses are the two critical biological processes shared by HF and lung cancer. Therefore, our study aimed to select the core genes in HF and then investigate the potential mechanisms underlying HF and lung cancer, including oxidative stress and immune responses through the selected genes.MethodsDifferentially expressed genes (DEGs) were analyzed for HF using datasets extracted from the Gene Expression Omnibus database. Functional enrichment analysis was subsequently performed. Next, weighted gene co-expression network analysis was performed to select the core gene modules. Support vector machine models, the random forest method, and the least absolute shrinkage and selection operator (LASSO) algorithm were applied to construct a multigene signature. The diagnostic values of the signature genes were measured using receiver operating characteristic curves. Functional analysis of the signature genes and immune landscape was performed using single-sample gene set enrichment analysis. Finally, the oxidative stress–related genes in these signature genes were identified and validatedin vitroin lung cancer cell lines.ResultsThe DEGs in the GSE57338 dataset were screened, and this dataset was then clustered into six modules using weighted gene co-expression network analysis; MEblue was significantly associated with HF (cor =−0.72, p < 0.001). Signature genes including extracellular matrix protein 2 (ECM2), methyltransferase-like 7B (METTL7B), meiosis-specific nuclear structural 1 (MNS1), and secreted frizzled-related protein 4 (SFRP4) were selected using support vector machine models, the LASSO algorithm, and the random forest method. The respective areas under the curve of the receiver operating characteristic curves of ECM2, METTL7B, MNS1, and SFRP4 were 0.939, 0.854, 0.941, and 0.926, respectively. Single-sample gene set enrichment analysis revealed significant differences in the immune landscape of the patients with HF and healthy subjects. Functional analysis also suggested that these signature genes may be involved in oxidative stress. In particular, METTL7B was highly expressed in lung cancer cell lines. Meanwhile, the correlation between METTL7B and oxidative stress was further verified using flow cytometry.ConclusionWe identified that ECM2, METTL7B, MNS1, and SFRP4 exhibit remarkable diagnostic performance in patients with HF. Of note, METTL7B may be involved in the co-occurrence of HF and lung cancer by affecting the oxidative stress immune responses.