Patients with chronic liver diseases (CLD) including chronic hepatitis B and hepatic cirrhosis (CIR) are the major high-risk population of hepatocellular carcinoma (HCC). The differential diagnosis between CLD and HCC is a challenge. This work aims to study the related metabolic deregulations in HCC and CLD to promote the discovery of the differential metabolites for distinguishing the different liver diseases. Serum metabolic profiling analysis from patients with CLD and HCC was performed using a liquid chromatography-mass spectrometry system. The acquired large amount of metabolic information was processed with the random forest-recursive feature elimination method to discover important metabolic changes. It was found that long-chain acylcarnitines accumulated, whereas free carnitine, medium and short-chain acylcarnitines decreased with the severity of the non-malignant liver diseases, accompanied with corresponding alterations of enzyme activities. However, the general changing extent was smaller in HCC than in CIR, possibly due to the special energy-consumption mechanism of tumor cells. These observations may help to understand the mechanism of HCC occurrence and progression on the metabolic level and provide information for the identification of early and differential metabolic markers for HCC.