BackgroundCancer stemness has been proven to affect tumorigenesis, metastasis, and drug resistance in various cancers, including lung squamous cell carcinoma (LUSC). We intended to develop a clinically applicable stemness subtype classifier that could assist physicians in predicting patient prognosis and treatment response.MethodsThis study collected RNA-seq data from TCGA and GEO databases to calculate transcriptional stemness indices (mRNAsi) using the one-class logistic regression machine learning algorithm. Unsupervised consensus clustering was conducted to identify a stemness-based classification. Immune infiltration analysis (ESTIMATE and ssGSEA algorithms) methods were used to investigate the immune infiltration status of different subtypes. Tumor Immune Dysfunction and Exclusion (TIDE) and Immunophenotype Score (IPS) were used to evaluate the immunotherapy response. The pRRophetic algorithm was used to estimate the efficiency of chemotherapeutic and targeted agents. Two machine learning algorithms (LASSO and RF) and multivariate logistic regression analysis were performed to construct a novel stemness-related classifier.ResultsWe observed that patients in the high-mRNAsi group had a better prognosis than those in the low-mRNAsi group. Next, we identified 190 stemness-related differentially expressed genes (DEGs) that could categorize LUSC patients into two stemness subtypes. Patients in the stemness subtype B group with higher mRNAsi scores exhibited better overall survival (OS) than those in the stemness subtype A group. Immunotherapy prediction demonstrated that stemness subtype A has a better response to immune checkpoint inhibitors (ICIs). Furthermore, the drug response prediction indicated that stemness subtype A had a better response to chemotherapy but was more resistant to epidermal growth factor receptor tyrosine kinase inhibitors (EGFR-TKIs). Finally, we constructed a nine-gene-based classifier to predict patients’ stemness subtype and validated it in independent GEO validation sets. The expression levels of these genes were also validated in clinical tumor specimens.ConclusionThe stemness-related classifier could serve as a potential prognostic and treatment predictor and assist physicians in selecting effective treatment strategies for patients with LUSC in clinical practice.Supplementary InformationThe online version contains supplementary material available at 10.1186/s12885-023-10918-y.