Nonalcoholic fatty liver disease (NAFLD) is a clinicopathological syndrome characterized by excessive intracellular fat deposition in the hepatocytes, and the development is exacerbated by gut microbiota and bile acids metabolism disorders. Ilex hainanensis Merr. is a traditional medicine of the Zhuang nationality, historically esteemed for its efficacy in lowering blood pressure and lipid levels. This study aimed to investigate the pharmacodynamic effects in NAFLD mice and impacts on gut microbiota and bile acids (BAs) metabolism of I. hainanensis extract (IHA). 16 compounds were identified from IHA by HPLC-DAD-MS analysis. IHA significantly reduced body weight indexs, alanine transaminase (ALT) and aspartate transaminase (AST) activities, improved dyslipidemia and insulin resistance (IR), and effectively ameliorated hepatic steatosis in HFD-induced NAFLD mice. IHA also altered gut microbiota composition, particularly enhancing the abundance of bacteria involved in BAs metabolism, as well as augmented BAs synthesis in the liver and increased fecal excretion. In conclusion, our findings suggest that IHA holds promise in improving NAFLD conditions and modulating gut microbiota and BAs metabolism. These insights contribute to a deeper understanding of the mechanisms underlying IHA-mediated alleviation of lipid accumulation in NAFLD.