Hepatocellular carcinoma (HCC) is one of the most significant causes of cancer-related deaths in the worldwide. Currently, predicting the survival of patients with HCC and developing treatment drugs still remain a significant challenge. In this study, we employed prognosis-related genes to develop and externally validate a predictive risk model. Furthermore, the correlation between signaling pathways, immune cell infiltration, immunotherapy response, drug sensitivity, and risk score was investigated using different algorithm platforms in HCC. Our results showed that 11 differentially expressed genes including UBE2C, PTTG1, TOP2A, SPP1, FCN3, SLC22A1, ADH4, CYP2C8, SLC10A1, F9, and FBP1 were identified as being related to prognosis, which were integrated to construct a prediction model. Our model could accurately predict patients’ overall survival using both internal and external datasets. Moreover, a strong correlation was revealed between the signaling pathway, immune cell infiltration, immunotherapy response, and risk score. Importantly, a novel potential drug candidate for HCC treatment was discovered based on the risk score and also validated through ex vivo experiments. Our finds offer a novel perspective on prognosis prediction and drug exploration for cancer patients.