The lack of highly sensitive and specific diagnostic biomarkers is a major contributor to the poor outcomes of patients with hepatocellular carcinoma (HCC), the second-most common cause of cancer deaths worldwide. We sought to develop a clinically convenient and minimally-invasive approach that can be deployed at scale for the sensitive, specific, and highly reliable diagnosis of HCC, and to evaluate the potential prognostic value of this approach. The study cohort comprised of 2,728 subjects, including HCC patients (n = 1,208), controls (n = 965) (572 healthy individuals and 393 patients with benign lesions), as well as patients with chronic hepatitis B infection (CHB) (n =291), liver cirrhosis (LC) (n= 110), and cholangio-carcinoma (CCC) (n = 154), was recruited from three major liver cancer hospitals in Shanghai, China, from July 2016 to November 2017. Circulating cell-free DNA (cfDNA) were collected from plasma samples from these individuals before surgery or any radical treatment. Applying our 5hmC-Seal technique, the summarized 5-hydroxymethylcytosine (5hmC) pro-files in cfDNA were obtained. Molecular annotation analysis suggested that the profiled 5hmC loci in cfDNA were enriched with liver tissue-derived regulatory markers (e.g., H3K4me1). We showed that a weighted diagnostic score (wd-score) based on 117 genes detected using the summarized 5hmC profiles in cfDNA accurately distinguished HCC patients from controls (AUC = 95.1%; 95% CI, 93.6-96.5%) in the validation set, markedly outperformed α-fetoprotein (AFP) with superior sensitivity. The wd-scores, which not only detected early BCLC stages (e.g., Stage 0: AUC = 96.2%; 95% CI, 94.1-98.4%) and small tumors (e.g., < 2 cm: AUC = 95.7%; 95% CI: 93.6-97.7%), also showed high capacity for distinguishing HCC from non-cancer patients with CHB/LC (AUC = 80.2%; 95% CI, 75.8-84.6%). Moreover, the prognostic value of 5hmC markers in cfDNA was evaluated for HCC recurrence, showing that a weighted prognostic score (wp-score) based on 16 marker genes predicted the recurrence risk (HR = 6.67; 95% CI, 2.81-15.82, p < 0.0001) in 555 patients who have been followed up after surgery. In conclusion, we have developed and validated a robust 5hmC-based diagnostic model that can be applied routinely with clinically feasible amount of cfDNA (e.g., from ~2-5 mL of plasma). Applying this new approach in the clinic could significantly improve the clinical outcomes of HCC patients, for example by early detection of those patients with surgically resectable tumors or as a convenient disease surveillance tool for recurrence.