Background: Accumulating evidence has suggested that the extracellular matrix (ECM) plays a vital role in the development and progression of cancer, and could be recognized as a biomarker of the response to immunotherapy. However, the effect of the ECM signature in hepatocellular carcinoma (HCC) is not well understood.Methods: HCC patients derived from the TCGA-LIHC dataset were clustered according to the ECM signature. The differences in prognosis, functional enrichment, immune infiltration, and mutation characteristics between distinct molecular clusters were examined, and its predictive value on the sensitivities to chemotherapy and immunotherapy was further analyzed. Then, a prognostic model was built based on the ECM-related gene expression pattern.Results: HCC patients were assigned into two molecular subtypes. Approximately 80% of HCC patients were classified into cluster A with poor prognosis, more frequent TP53 mutation, and lower response rate to immunotherapy. In contrast, patients in cluster B had better survival outcomes and higher infiltration levels of dendritic cells, macrophages, and regulatory T cells. The prognostic risk score model based on the expression profiles of six ECM-related genes (SPP1, ADAMTS5, MMP1, BSG, LAMA2, and CDH1) demonstrated a significant association with higher histologic grade and advanced TNM stage. Moreover, the prognostic risk score showed good performance in both the training dataset and validation dataset, as well as improved prognostic capacity compared with TNM stage.Conclusions: We characterized two HCC subtypes with distinct clinical outcomes, immune infiltration, and mutation characteristics. A novel prognostic model based on the ECM signature was further developed, which may contribute to individualized prognostic prediction and aid in clinical decision-making.