Liver cancer, including hepatocellular carcinoma and cholangiocarcinoma, can be devastating if not treated early. The risk factors of liver cancer include alcoholic liver disease, non-alcoholic fatty liver disease, disruption of melatonin levels, and dysregulated circadian rhythm. The circadian rhythm is a 24-hour biological clock that regulates the physiological activities at both central and peripheral levels. Its molecular mechanism exists in every cell in mammals. Disruption of the circadian rhythm has found in liver cancers as an independent risk factor. This review summarized the most recent findings about the molecular mechanisms of circadian rhythm, the crosstalk between core clock genes and melatonin, as well as the role of circadian rhythm and melatonin played in chronic liver diseases and liver cancer. Finally, we discussed the potential clinical application of circadian rhythm and melatonin for the treatment of liver cancer and discussed future perspectives of how understanding the circadian rhythm in liver cancer progression could provide new clinical applications for liver cancer treatment and diagnosis.