BackgroundForkhead box M1 (FOXM1) is a member of the Forkhead box (Fox) transcription factor family. It regulates cell mitosis, cell proliferation, and genome stability. However, the relationship between the expression of FOXM1 and the levels of m6a modification, immune infiltration, glycolysis, and ketone body metabolism in HCC has yet to be fully elucidated.MethodsTranscriptome and somatic mutation profiles of HCC were downloaded from the TCGA database. Somatic mutations were analyzed by maftools R package and visualized in oncoplots. GO, KEGG and GSEA function enrichment was performed on FOXM1 co-expression using R. We used Cox regression and machine learning algorithms (CIBERSORT, LASSO, random forest, and SVM-RFE) to study the prognostic value of FOXM1 and immune infiltrating characteristic immune cells in HCC. The relationship between FOXM1 and m6A modification, glycolysis, and ketone body metabolism were analyzed by RNA-seq and CHIP-seq. The competing endogenous RNA (ceRNA) network construction relies on the multiMiR R package, ENCORI, and miRNET platforms.ResultsFOXM1 is highly expressed in HCC and is associated with a poorer prognosis. At the same time, the expression level of FOXM1 is significantly related to the T, N, and stage. Subsequently, based on the machine learning strategies, we found that the infiltration level of T follicular helper cells (Tfh) was a risk factor affecting the prognosis of HCC patients. The high infiltration of Tfh was significantly related to the poor overall survival rate of HCC. Besides, the CHIP-seq demonstrated that FOXM1 regulates m6a modification by binding to the promoter of IGF2BP3 and affects the glycolytic process by initiating the transcription of HK2 and PKM in HCC. A ceRNA network was successfully obtained, including FOXM1 - has-miR-125-5p – DANCR/MIR4435-2HG ceRNA network related to the prognosis of HCC.ConclusionOur study implicates that the aberrant infiltration of Tfh associated with FOXM1 is a crucial prognostic factor for HCC patients. FOXM1 regulates genes related to m6a modification and glycolysis at the transcriptional level. Furthermore, the specific ceRNA network can be used as a potential therapeutic target for HCC.