ABSTRACT: Background: Due to the heterogeneity of tumors and the complexity of the immune microenvironment, the specific role of ferroptosis and pyroptosis in hepatocellular carcinoma (HCC) is not fully understood, especially its impact on prognosis. Methods: The training set (n = 609, merged by TCGA and GSE14520) was clustered into three subtypes (C1, C2, and C3) based on the prognosis-related genes associated with ferroptosis and pyroptosis. The intersecting differentially expressed genes (DEGs) among C1, C2, and C3 were used in univariate Cox and LASSO penalized Cox regression analysis for the construction of the risk score. The median risk score served as the unified cutoff to divide patients into high- and low-risk groups. Results: Internal (TCGA, n = 370; GSE14520, n = 239) and external validation (ICGC, n = 231) suggested that the 12-gene risk score had high accuracy in predicting the OS, DSS, DFS, PFS, and RFS of HCC. As an independent prognostic indicator, the risk score could be applicable for patients with different clinical features tested by subgroup (n = 26) survival analysis. In the high-risk patients with a lower infiltration abundance of activated B cells, activated CD8 T cells, eosinophils, and type I T helper cells and a higher infiltration abundance of immature dendritic cells, the cytolytic activity, HLA, inflammation promotion, and type I IFN response in the high-risk group were weaker. The TP53 mutation rate, TMB, and CSC characteristics in the high-risk group were significantly higher than those in the low-risk group. Low-risk patients have active metabolic activity and a more robust immune response. The high- and low-risk groups differed significantly in histology grade, vascular tumor cell type, AFP, new tumor event after initial treatment, main tumor size, cirrhosis, TNM stage, BCLC stage, and CLIP score. Conclusion: The ferroptosis and pyroptosis molecular subtype-related signature identified and validated in this work is applicable for prognosis prediction, immune microenvironment estimation, stem cell characteristics, and clinical feature assessment in HCC.