Background: Hepatocellular carcinoma (HCC) is a malignant tumor associated with high morbidity and mortality. Therefore, it is of great importance to develop effective prognostic models and guide clinical treatment in HCC. Protein lactylation is found in HCC tumors and is associated with HCC progression. Methods: The expression levels of lactylation-related genes were identified from the TCGA database. A lactylation-related gene signature was constructed using LASSO regression. The prognostic value of the model was assessed and further validated in the ICGC cohort, with the patients split into two groups based on risk score. Glycolysis and immune pathways, treatment responsiveness, and the mutation of signature genes were analyzed. The correlation between PKM2 expression and the clinical characteristics was investigated. Results: Sixteen prognostic differentially expressed lactylation-related genes were identified. An 8-gene signature was constructed and validated. Patients with higher risk scores had poorer clinical outcomes. The two groups were different in immune cell abundance. The high-risk group patients were more sensitive to most chemical drugs and sorafenib, while the low-risk group patients were more sensitive to some targeted drugs such as lapatinib and FH535. Moreover, the low-risk group had a higher TIDE score and was more sensitive to immunotherapy. PKM2 expression correlated with clinical characteristics and immune cell abundance in the HCC samples. Conclusions: The lactylation-related model exhibited robust predictive efficiency in HCC. The glycolysis pathway was enriched in the HCC tumor samples. A low-risk score indicated better treatment response to most targeted drugs and immunotherapy. The lactylation-related gene signature could be used as a biomarker for the effective clinical treatment of HCC.