Primary liver cancer is the third leading cause of cancer-related death worldwide. Most patients are diagnosed at late stages with poor prognosis; thus, identification of modifiable risk factors for primary prevention of liver cancer is urgently needed. The well-established risk factors of liver cancer include chronic infection with hepatitis B virus (HBV) or hepatitis C virus (HCV), heavy alcohol consumption, metabolic diseases such as obesity and diabetes, and aflatoxin exposure. However, a large proportion of cancer cases worldwide cannot be explained by current known risk factors. Dietary factors have been suspected as important, but dietary aetiology of liver cancer remains poorly understood. In this review, we summarised and evaluated the observational studies of diet including single nutrients, food and food groups, as well as dietary patterns with the risk of developing liver cancer. Although there are large knowledge gaps between diet and liver cancer risk, current epidemiological evidence supports an important role of diet in liver cancer development. For example, exposure to aflatoxin, heavy alcohol drinking and possibly dairy product (not including yogurt) intake increase, while intake of coffee, fish and tea, light-to-moderate alcohol drinking and several healthy dietary patterns (e.g. Alternative Healthy Eating Index) may decrease liver cancer risk. Future studies with large sample size and accurate diet measurement are warranted and need to consider issues such as the possible aetiological heterogeneity between liver cancer subtypes, the influence of chronic HBV or HCV infection, the high-risk populations (e.g. cirrhosis) and a potential interplay with host gut microbiota or genetic variations.