T-cell exhaustion (TEX) and high heterogeneity of cancer stem cells (CSCs) are associated with progression, metastasis, and treatment resistance in hepatocellular carcinoma (HCC). Here, we aim to characterize TEX-stemness-related genes (TEXSRGs) and screen for HCC patients who are more sensitive to immunotherapy. The immune cell abundance identifier (ImmuCellAI) was utilized to precisely evaluate the abundance of TEX and screen TEX-related genes. The stemness index (mRNAsi) of samples was analyzed through the one-class logistic regression (OCLR) algorithm. Application of the non-negative matrix decomposition algorithm (NMF) for subtype identification of HCC samples. The different subtypes were assessed for differences in prognosis, tumor microenvironment (TME) landscape, and immunotherapy treatment response. Then, the TEXSRGS-score, which can accurately forecast the survival outcome of HCC patients, was built by LASSO-Cox and multivariate Cox regression, and experimentally validated for the most important TEXSRGs. We also analyzed the expression of TEXSRGs and the infiltration of CD8+ T cells in clinical samples using qRT-PCR and immunohistochemistry (IHC). Based on 146 TEXSRGs, we found two distinct clinical phenotypes with different TEX infiltration abundance, tumor stemness index, enrichment pathways, mutational landscape, and immune cell infiltration through the non-negative matrix decomposition algorithm (NMF), which were confirmed in the ICGC dataset. Utilizing eight TEXSRGs linked to clinical outcome, we created a TEXSRGs-score model to further improve the clinical applicability. Patients can be divided into two groups with substantial differences in the characteristics of immune cell infiltration, TEX infiltration abundance, and survival outcomes. The results of qRT-PCR and IHC analysis showed that PAFAH1B3, ZIC2, and ESR1 were differentially expressed in HCC and normal tissues and that patients with high TEXSRGs-scores had higher TEX infiltration abundance and tumor stemness gene expression. Regarding immunotherapy reaction and immune cell infiltration, patients with various TEXSRGs-score levels had various clinical traits. The outcome and immunotherapy efficacy of patients with low TEXSRGs-score was favorable. In conclusion, we identified two clinical subtypes with different prognoses, TEX infiltration abundance, tumor cell stemness index, and immunotherapy response based on TEXSRGs, and developed and validated a TEXSRGs-score capable of accurately predicting survival outcomes in HCC patients by comprehensive bioinformatics analysis. We believe that the TEXSRGs-score has prospective clinical relevance for prognostic assessment and may help physicians select prospective responders in preference to current immune checkpoint inhibitors (ICIs).