Considering the high fatality of hepatocellular carcinoma (HCC), current prognostic systems are insufficient to accurately forecast HCC patients' outcomes. In our study, nine anoikis‑related genes (PTRH2, ITGAV, ANXA5, BIRC5, BDNF, BSG, DAP3, SKP2, and EGF) were determined to establish a risk scoring model using LASSO regression, which could be validated in ICGC dataset. Kaplan–Meier curves and time-dependent receiver operating characteristic (ROC) curve analysis confirmed the risk score possessed an accurate predictive value for the prognosis of HCC patients. The high-risk group showed a higher infiltration of aDCs, macrophages, T-follicular helper cells, and Th2 cells. Besides, PD-L1 was significantly higher in the high-risk group compared to the low-risk group. Several anoikis‑related genes, such as ANX5, ITGAV, BDNF and SKP2, were associated with drug sensitivity in HCC. Finally, we identified BIRC5 and SKP2 as hub genes among the nine model genes using WGCNA analysis. BIRC5 and SKP2 were over-expressed in HCC tissues, and their over-expression was associated with poor prognosis, no matter in our cohort by immunohistochemical staining or in the TCGA cohort by mRNA-Seq. In our cohort, BIRC5 expression was highly associated with the T stage, pathologic stage, histologic grade and AFP of HCC patients. In general, our anoikis-related risk model can enhance the ability to predict the survival outcomes of HCC patients and provide a feasible therapeutic strategy for immunotherapy and drug resistance in HCC. BIRC5 and SKP2 are hub genes of anoikis‑related genes in HCC.