The heterogeneity in prognostic survival and treatment response of hepatocellular carcinoma (HCC) limits the accurate assessment of HCC-specific mortality. This study aimed to identify potential HCC subtypes through latent class analysis (LCA) to improve HCC-specific mortality prediction and optimize treatment recommendations. We analyzed data from 7746 HCC patients in the Surveillance, Epidemiology, and End Results (SEER) databases, incorporating demographic and clinicopathological information and applying LCA to identify HCC subtypes. Prognostic survival and treatment response across different HCC subtypes were evaluated utilizing Cox proportional hazards regression and competing risks models. The classification was externally validated with data from 6791 patients. Four HCC subtypes (LCAC1-LCAC4) were determined. Compared with LCAC1, both LCAC2 (HR = 1.887, p < .001) and LCAC4 (HR = 1.317, p < .001) were associated with significantly shorter overall survival. LCAC2 had the highest HCC-specific mortality (HR: 2.395, p < .001), followed by LCAC4 (HR: 1.531, p < .001), and LCAC3 (HR: 1.424, p < .001). LCAC3 was associated with the lowest risk of non-HCC-specific mortality (HR: 0.613, p < .001). Surgical treatment, particularly preoperative systemic therapy, significantly improved survival across all HCC subtypes, whereas chemotherapy and radiotherapy had limited efficacy in LCAC1 and LCAC3 patients. External validation corroborated these findings. This study provides a classification system that differentiates HCC-specific mortality, facilitating accurate survival stratification and treatment recommendations, and provides valuable insight for clinical decision-making.