Background The incidence of squamous lung cancer (LUSC) has substantially increased. Systematic studies of metabolic genomic patterns are fundamental for the treatment and prediction of LUSC. Because cancer metabolism and immune cell metabolism have been studied in depth, metabolism and the state and function of immune cells have become key factors in tumor development. This also indicates that metabolic genes and the tumor immune microenvironment (TME) are crucial in tumor treatment. This study is aimed at dissecting the connection between TME and LUSC digestion-related qualities. Methods The information used in this study was obtained from The Cancer Genome Atlas dataset. Metabolism-related genes in patients with LUSC were screened, and relevant clinical data were collated. Next, genes associated with prognosis were screened using univariate COX regression and LASSO regression analyses. Finally, a timer database study was conducted to analyze the molecular mechanisms of immune cell infiltration of LUSC prognosis-related metabolic genes at the immune cell level. Results Nine metabolism-related genes were identified: ADCY7, ALDH3B1, CHIA, CYP2C18, ENTPD6, GGCT, HPRT1, PLA2G1B, and PTGIS. A clinical prediction model for LUSC based on metabolism-related genes was constructed. In addition, 22 subpopulations of tumor-infiltrating immune cells (TIIC) in the TME were analyzed using the CIBERSORT algorithm. Finally, we used the TIMER database to analyze the immune infiltration of LUSC and the relationship between metabolism-related genes and immune cells. Conclusion Our study identified metabolic genes associated with the prognosis of LUSC, which are important markers for its diagnosis, clinically relevant assessments, and prognosis. The relationship between metabolic genes with prognostic impact and immune infiltration was also analyzed, and a metabolic gene-based clinical prediction model was identified, providing a new perspective for LUSC treatment.