The use of caffeine in treating various liver diseases has made substantial progress in the past decade owing to advances in science, technology, and medicine. However, whether caffeine has a preventive effect on hepatocellular carcinoma (HCC) and its mechanism are still worth further investigation. In this review, we summarize and analyze the efficacy and safety of caffeine in the prevention of HCC. We conducted a review of articles published in PubMed and Web of Science in the past 2 decades until December 6, 2023, which were searched for using the terms "Caffeine" and "Hepatocellular Carcinoma." Studies have found that coffee intake is negatively correlated with HCC risk, especially caffeinated coffee. Recent studies have found that caffeine has beneficial effects on liver health, decreasing levels of enzymes responsible for liver damaging and slowing the progression of hepatic fibrosis and cirrhosis. Caffeine also acts against liver fibrosis through adenosine receptors (ARs), which promote tissue remodeling by inducing fibrin and collagen production. Additionally, new studies have found that moderate consumption of caffeinated beverages can decrease various the levels of various collagens in patients with chronic hepatitis C. Furthermore, polyphenolic compounds in coffee can improve fat homeostasis, reduce oxidative stress, and prevent liver steatosis and fibrosis. Moreover, many in vitro studies have shown that caffeine can protect liver cells and inhibit the activation and proliferation of hepatic stellate cells. Taken together, we describe the benefits of caffeine for liver health and highlight its potential values as a drug to prevent various hepatic diseases. As a protective agent of liver inflammation, non-selective AR inhibitor caffeine can inhibit the growth of HCC cells by inhibiting adenosine and AR binding to initiate immune response, providing a basis for the future development of caffeine as an adjuvant drug against HCC.