Background: Hepatocellular carcinoma (HCC) is a common malignancy and the third most deadly cancer worldwide. Previous studies have demonstrated that circulating tumor cells are involved in the occurrence and development of various cancers, including HCC. For this study, we aimed to comprehensively analyze data related to HCC to develop a prognostic model based on CTCs/CTMs related genes (CRGs). Methods: Data were obtained from TCGA, ICGC, and GEO. Firstly, we screened the differentially expressed CRGs and constructed a signature in the TCGA cohort by Lasso‐penalized Cox regression analysis and the multivariate cox regression analysis. Then, the prognostic model was validated in the ICGC dataset and GES14520 dataset with survival analysis and receiver operating characteristic analysis. Moreover, we investigated the clinical significance of prognostic signature, including the correlations with clinical characteristics, immune cell infiltration, and immune checkpoints. Next, we also established the nomogram and to better predict the prognosis of patients. We identified five potential small molecule drugs by Connectivity Map (CMap) and validated them using the Comparative Toxicogenomics Database (CTD). Besides, we further explored the biological role of CDCA8 in hepatocellular carcinoma cells.Results: The prognostic signature exhibited good predictive power and clinical application. Besides, the signature was associated with immune checkpoints (PD-1, PD-L1, and CTLA4), implying that high-risk patients might benefit more from immunotherapy. Additionally, In vitro experiments showed that CDCA8 could promote the proliferation, invasion, and metastasis of hepatocellular carcinoma cells, and silencing CDCA8 could lead to cell cycle arrest and increased apoptosis.Conclusion: We developed a multi-gene classifier that can effectively help the HCC patients benefit from target therapy or immune therapy. And CDCA8 may be the next therapeutic target for hepatocellular carcinoma.