Hepatocellular carcinoma (HCC) is one of the most prevalent life-threatening human cancers and the leading cause of cancer-related mortality, with increased global incidence within the last decade. Identification of effective diagnostic and prognostic biomarkers would enable reliable risk stratification and efficient screening of highrisk patients, thereby facilitating clinical decision-making. Herein, we performed a comprehensive, robust DNA methylation analysis based on genome-wide DNA methylation profiling. We constructed a diagnostic signature with five DNA methylation markers, which precisely distinguished HCC patients from normal controls. Cox regression and LASSO analysis were applied to construct a prognostic signature with four DNA methylation markers. A one-to-one correlation analysis was carried out between genes of the whole genome and our prognostic signature. Exploration of the biological function and the role of the underlying significantly correlated genes was conducted. A mixed dataset of 463 HCC patients and 253 normal controls, derived from six independent datasets, was used to valid the diagnostic signature. Results showed a specificity of 96.84% and sensitivity of 96.77%. Class scores for the diagnostic signature were significantly different between normal controls, individuals with liver diseases, and HCC patients. The present signature has the potential to serve as a biomarker to monitor health in normal controls. Additionally, HCC patients were successfully separated into low-risk and high-risk groups by the prognostic signature, with a better prognosis for patients in the low-risk group. Kaplan-Meier and ROC analysis confirmed that the prognostic signature performed well. We found eight of the top ten genes to positively correlate with risk scores of the prognostic signature, and to be involved in cell cycle regulation. This eight-gene panel also served as a prognostic signature. The robust evidence presented in this study therefore demonstrates the effectiveness of the prognostic signature. In summary, we constructed diagnostic and prognostic signatures,