Hepatocellular carcinoma (HCC) is a prevalent cancer in China, with chronic hepatitis B (CHB) and liver cirrhosis (LC) being high-risk factors for developing HCC. Here, we determined the serum proteomes (762 proteins) of 125 healthy controls and Hepatitis B virus–infected CHB, LC, and HCC patients and constructed the first cancerous trajectory of liver diseases. The results not only reveal that the majority of altered biological processes were involved in the hallmarks of cancer (inflammation, metastasis, metabolism, vasculature, and coagulation) but also identify potential therapeutic targets in cancerous pathways (i.e., IL17 signaling pathway). Notably, the biomarker panels for detecting HCC in CHB and LC high-risk populations were further developed using machine learning in two cohorts comprised of 200 samples (discovery cohort = 125 and validation cohort = 75). The protein signatures significantly improved the area under the receiver operating characteristic curve of HCC (CHB discovery and validation cohort = 0.953 and 0.891, respectively; LC discovery and validation cohort = 0.966 and 0.818, respectively) compared to using the traditional biomarker, alpha-fetoprotein, alone. Finally, selected biomarkers were validated with parallel reaction monitoring mass spectrometry in an additional cohort (n = 120). Altogether, our results provide fundamental insights into the continuous changes of cancer biology processes in liver diseases and identify candidate protein targets for early detection and intervention.