Anoikis resistance, the acquired ability of tumor cells to resist detachment-induced cell death, has been linked to loss of cellular homeostasis, cancer growth, and metastasis. After cancer cells acquire this ability, they can spread to other tissues or organs in the body through the blood circulation system, promoting the distant metastasis of cancer. Therefore, studying the molecular mechanism of anti-anoikis is one of the effective methods for discovering the treatment of human malignant tumors. This article aims to explore the expression of anoikis genes in hepatocellular carcinoma, identify and characterize the molecular subtypes based on anoikis genes, screen key features, construct a prognostic signature, and explore the treatment response of patients with different risks. This study utilized the TCGA tumor database to calculate differential expression between hepatocellular carcinoma and adjacent tissues using the limma package. A protein interaction network was constructed using the STRING database for gene GO enrichment analysis. Consensus clustering analysis was performed on anoikis apoptotic genes using TCGA tumor sample data as a training set to identify molecular subtypes. Principal component analysis was also performed, along with survival difference analysis on different groups. Additionally, immune cellular infiltration was analyzed using CIBERSORT, XCELL, SSGSEA, and ESTIMATE analysis tools. Finally, univariate cox screening was used to identify prognostic related genes based on differentially expressed genes between subtypes.Based on the analysis of prognostic genes, we utilized the LASSO cox algorithm to eliminate redundant genes and construct a prognostic model using characteristic genes. The prognostic performance was evaluated through training and verification sets, and patients were classified into high and low risk groups based on the median score of the model. Survival differences were then compared between these groups. Univariate and multivariate cox analyses were conducted to confirm that the signature genes were independent prognostic factors. Lastly, relevant molecular responses and potential drug treatment effects were predicted. Most anoikis genes were broadly dysregulated in the TCGA-LIHC cohort; molecular subtypes were identified using unsupervised clustering, and samples were divided into 2 subtypes with significant prognostic differences between subtypes difference; 13 key prognostic genes were finally screened and a risk scoring model was built. The prognostic model had a higher AUC and had a better predictive effect; drug efficacy prediction had a better curative effect in the low-risk group. In this study, a prognostic model of anoikis-related genes in liver hepatocellular carcinoma was constructed, and the model has good predictive performance.