Hepatocellular carcinoma (HCC) is a common primary malignant tumor and cause of cancer-related death in humans. Increasing evidence indicates that an imbalance in N6-methyladenosine (m6A) methylation is strongly linked to the occurrence and development of cancer. We used comprehensive bioinformatics to establish a potential prognostic model of HCC based on m6A methylation-related genes. And case analyses were used to verify the results. The clinical data and gene expressions were obtained from The Cancer Genome Atlas (TCGA) and International Cancer Genome Consortium (ICGC) databases. The prognostic value of m6A methylation-related genes in HCC patients and their relationship with the immune microenvironment were explored by comprehensive bioinformatics analyses. We also collected pathological specimens from 70 patients with HCC from the Department of Pathology, Affiliated Hospital of Qingdao University, and performed immunohistochemical staining on the specimens. We compared tumor specimens from 27 patients positive for METTL3, YTHDF2, and ZC3H13 staining with their adjacent normal tissues and against 27 patient specimens negative for METTL3, YTHDF2, and ZC3H13. The influence of METTL3, YTHDF2, and ZC3H13 on survival was analyzed, and the prognostic model for METTL3, YTHDF2, and ZC3H13 in HCC was verified by clinical data. Most m6A methylation-related genes showed significantly different expressions between cancer and normal tissues. Three candidate m6A methylation-related genes (YTHDF2, METTL3, and ZC3H13) were significantly correlated with the overall survival (OS) of HCC patients. A Kaplan-Meier survival analysis indicated a worse prognosis of high-risk patients than that of low-risk patients. Immunological analysis showed that the high-risk group was more likely to have higher follicular helper T cell counts and lower resting memory CD4 T cell counts. The expression of YTHDF2, METTL3, and ZC3H13 was validated by other databases, including the Oncomine database, the Human Protein Atlas (HPA), and the Kaplan-Meier plotter. Our prognostic model based on m6A methylation-related genes effectively predicted the prognosis of HCC patients.