Background: 5-methylcytosine (5mC) has been reported in the prognosis of a variety of cancers, however, its role in hepatocellular carcinoma (HCC) has not been investigated yet. This study aimed at identifying the molecular subtypes associated with 5mC and establishing a relevant score to predict its prognosis in HCC. Methods: Somatic gene mutation data and gene expression data were retrieved from The Cancer Genome Atlas database. Molecular subtypes were identified by unsupervised clustering based on the expression of 5mC regulators, and the molecular features of each subtype were investigated by survival, mutation, gene set variation, and immune cell infiltration analyses. Next, we performed a differentially expressed analysis based on the new subtypes and selected the overlapping genes for further analysis. We undertook univariate Cox analysis to analyze these genes and constructed a prognostic model by lasso regression analysis. Meanwhile, survival and gene set enrichment analyses were used to explore the prognosis and the relevant pathways, respectively. The LIRI cohort from the International Cancer Genome Consortium database was used as a reference to validate the 5mC subtypes and 5mC score. Results: Twenty-one types of 5mC regulators were employed in this study, and three 5mC-associated molecular subtypes were identified. These three subtypes presented significant differences in prognosis, immune cell infiltration, immune checkpoint inhibitors, signaling pathways, and mutational features. Compared with cluster 3, cluster 2 exhibited significantly increased expression of PD-L1, TIM3, Galectin9, CTLA4, and CD80, while PD-L1, TIM3, and CD80 were higher in cluster 2 than in cluster 1. Furthermore, a 5mC-related score, composed of seven genes (SGPP2, SALL4, B3GNT7, ROR1, MYBL2, SLC7A1, and CAND2), was proven to be significantly associated with prognosis. The established subtypes and scores were thus successfully verified by the validated cohort.