Non-alcoholic fatty liver disease (NAFLD)-associated hepatocellular carcinoma (HCC) is an increasing healthcare burden worldwide. We examined the role of dietary cholesterol in driving NAFLD-HCC through modulating gut microbiota and its metabolites. High-fat/high-cholesterol (HFHC), high-fat/low-cholesterol or normal chow diet was fed to C57BL/6 male littermates for 14 months. Cholesterol-lowering drug atorvastatin was administered to HFHC-fed mice. Germ-free mice were transplanted with stools from mice fed different diets to determine the direct role of cholesterol modulated-microbiota in NAFLD-HCC. Gut microbiota was analysed by 16S rRNA sequencing and serum metabolites by liquid chromatography-mass spectrometry (LC-MS) metabolomic analysis. Faecal microbial compositions were examined in 59 hypercholesterolemia patients and 39 healthy controls. High dietary cholesterol led to the sequential progression of steatosis, steatohepatitis, fibrosis and eventually HCC in mice, concomitant with insulin resistance. Cholesterol-induced NAFLD-HCC formation was associated with gut microbiota dysbiosis. The microbiota composition clustered distinctly along stages of steatosis, steatohepatitis and HCC. Mucispirillum, Desulfovibrio, Anaerotruncus and Desulfovibrionaceae increased sequentially; while Bifidobacterium and Bacteroides were depleted in HFHC-fed mice, which was corroborated in human hypercholesteremia patients. Dietary cholesterol induced gut bacterial metabolites alteration including increased taurocholic acid and decreased 3-indolepropionic acid. Germ-free mice gavaged with stools from mice fed HFHC manifested hepatic lipid accumulation, inflammation and cell proliferation. Moreover, atorvastatin restored cholesterol-induced gut microbiota dysbiosis and completely prevented NAFLD-HCC development. Dietary cholesterol drives NAFLD-HCC formation by inducing alteration of gut microbiota and metabolites in mice. Cholesterol inhibitory therapy and gut microbiota manipulation may be effective strategies for NAFLD-HCC prevention. © Author(s) (or their employer(s)) 2021. Re-use permitted under CC BY-NC. No commercial re-use. See rights and permissions. Published by BMJ.