The objective of the present study was to explore the common and specific metabolic alterations of hepatocellular carcinoma (HCC) infected with hepatitis B virus (HBV) or hepatitis C virus (HCV). Serum profiling data revealed that the two HCC groups shared a mainly similar metabolic profile, providing a basis for investigating their common tumor pathogenesis mechanism and early diagnosis biomarkers. Arachidonic acid as a pro-inflammatory precursor increased significantly in the HCC group compared to the cirrhosis and healthy control. And the lysophosphatidylcholines (lysoPCs) with polyunsaturated fatty acid acyl chain with potent anti-inflammatory activity significantly decreased in the HCC and cirrhosis groups compared to those in the healthy control group, which may partly contribute to maintaining chronic inflammation and benefit the initiation and progression of the malignant hepatic tumor. The decreased ratios of polyunsaturated lysoPCs to saturated lysoPCs in HCC groups compared to chronic liver diseases infected with HBV or HCV and healthy control further demonstrated that a malignant liver tumor exerts profound influences independent of virus infection. Especially, serum endocannabinoids anandamide (AEA) and palmitylethanolamide (PEA) were found significantly elevated in HCC groups compared to healthy control, and in HCC with HCV compared to corresponding chronic liver diseases. AEA, PEA, or their combination showed better sensitivity, specificity, and the area under the curve for distinguishing HCC from chronic liver diseases, showing they are potential biomarkers to distinguish the HCC from cirrhosis infected with HCV.