Introduction The enhancer of rudimentary homolog (ERH) is significant in cancers, but its role in lung cancer is understudied. We divided lung cancer patients into high and low ERH expression groups based on tumor tissue levels. Methods Using the log-rank test, we analyzed the correlation between ERH expression and patient prognosis. The effects of high ERH expression on lung cancer cell proliferation, migration, and invasion were assessed using CCK8, EDU, transwell, and wound healing assays. Results ERH expression was significantly higher in cancerous versus normal lung tissue (p < 0.05), including lung adenocarcinoma (LUAD) and lung squamous cell carcinoma (LUSC). Patients with high ERH expression had worse overall survival (HR = 1.37, p = 2.5 × 10−7) and first progression survival (HR = 1.38, p = 0.00065) in lung cancer. However, while high ERH expression predicts an unfavorable prognosis in LUAD, it does not hold true for LUSC. Furthermore, knockdown of ERH inhibited lung cancer cell proliferation, migration, and invasion. ERH expression was linked to immune cell infiltration. High ERH expression in LUAD and LUSC samples correlated with higher CD8 T cell, T cells CD4 memory activated, and M1 macrophages abundance, while low ERH expression correlated with higher T cells CD4 memory resting abundance. Conclusion Upregulation of ERH in lung cancer tissue is associated with poor prognosis and immune cell infiltration.