Chronic obstructive pulmonary disease (COPD) is often associated with lung squamous cell carcinoma (LUSC), which has the same etiology (smoking, inflammation, oxidative stress, microenvironmental changes, and genetics). Smoking, inflammation, and airway remodeling are the most important and classical mechanisms of COPD comorbidity in LUSC patients. Cancer can occur during repeated airway damage and repair (airway remodeling). Changes in the inflammatory and immune microenvironments, which can cause malignant transformation of some cells, are currently being revealed in both LUSC and COPD patients. We obtained the GSE76925 dataset from the Gene Expression Omnibus database. Screening for possible COPD biomarkers was performed using the LASSO regression model and a random forest classifier. The compositional patterns of the immune cell fraction in COPD patients were determined using CIBERSORT. HTR2B expression was analyzed using validation datasets (GSE47460, GSE106986, and GSE1650). HTR2B expression in COPD cell models was determined via real-time quantitative PCR. Epithelial–mesenchymal transition (EMT) marker expression levels were determined after knocking down or overexpressing HTR2B. HTR2B function and mechanism in LUSC were analyzed with the Kaplan‒Meier plotter database. HTR2B expression was inhibited to detect changes in LUSC cell proliferation. A total of 1082 differentially expressed genes (DEGs) were identified in the GSE76925 dataset (371 genes were significantly upregulated, and 711 genes were significantly downregulated). Kyoto Encyclopedia of Genes and Genomes pathway enrichment analysis indicated that the DEGs were mainly enriched in the p53 signaling and β-alanine metabolism pathways. Gene Ontology enrichment analysis indicated that the DEGs were largely related to transcription initiation from the RNA polymerase I promoter and to the regulation of mononuclear cell proliferation. The LASSO regression model and random forest classifier results revealed that HTR2B, DPYS, FRY, and CD19 were key COPD genes. Immune cell infiltration analysis indicated that these genes were closely associated with immune cells. Analysis of the validation sets suggested that HTR2B was upregulated in COPD patients. HTR2B was significantly upregulated in COPD cell models, and its upregulation was associated with increased EMT marker expression. Compared with that in bronchial epithelial cells, HTR2B expression was upregulated in LUSC cells, and inhibiting HTR2B expression led to the inhibition of LUSC cell proliferation. In conclusions, HTR2B might be a new biomarker and therapeutic target in COPD patients with LUSC.