Abstract Background In recent decades, the prevalence of metabolic diseases, particularly diabetes, hyperlipidemia, obesity, and non-alcoholic fatty liver disease (NAFLD), has increased dramatically, causing great public health and economic burdens worldwide. Traditional Chinese medicine (TCM) serves as an effective therapeutic choice. Xiao-Ke-Yin (XKY) is a medicine and food homology TCM formula consisting of nine “medicine and food homology” herbs and is used to ameliorate metabolic diseases, such as insulin resistance, diabetes, hyperlipidemia and NAFLD. However, despite its therapeutic potential in metabolic disorders, the underlying mechanisms of this TCM remain unclear. This study aimed to evaluate the therapeutic effectiveness of XKY on glucolipid metabolism dysfunction and explore the potential mechanisms in db/db mice. Methods To verify the effects of XKY, db/db mice were treated with different concentrations of XKY (5.2, 2.6 and 1.3 g/kg/d) and metformin (0.2 g/kg/d, a hypoglycemic positive control) for 6 weeks, respectively. During this study, we detected the body weight (BW) and fasting blood glucose (FBG), oral glucose tolerance test (OGTT), insulin tolerance test (ITT), daily food intake and water intake. At the end of the animal experiment, blood samples, feces, liver and intestinal tissue of mice in all groups were collected. The potential mechanisms were investigated by using hepatic RNA sequencing, 16 S rRNA sequencing of the gut microbiota and metabolomics analysis. Results XKY efficiently mitigated hyperglycemia, IR, hyperlipidemia, inflammation and hepatic pathological injury in a dose dependent manner. Mechanistically, hepatic transcriptomic analysis showed that XKY treatment significantly reversed the upregulated cholesterol biosynthesis which was further confirmed by RT-qPCR. Additionally, XKY administration maintained intestinal epithelial homeostasis, modulated gut microbiota dysbiosis, and regulated its metabolites. In particular, XKY decreased secondary bile acid producing bacteria (Clostridia and Lachnospircaeae) and lowered fecal secondary bile acid (lithocholic acid (LCA) and deoxycholic acid (DCA)) levels to promote hepatic bile acid synthesis by inhibiting the LCA/DCA-FXR-FGF15 signalling pathway. Furthermore, XKY regulated amino acid metabolism including arginine biosynthesis, alanine, aspartate and glutamate metabolism, phenylalanine, tyrosine and tryptophan biosynthesis, and tryptophan metabolism likely by increasing Bacilli, Lactobacillaceae and Lactobacillus, and decreasing Clostridia, Lachnospircaeae, Tannerellaceae and Parabacteroides abundances. Conclusion Taken together, our findings demonstrate that XKY is a promising “medicine food homology” formula for ameliorating glucolipid metabolism and reveal that the therapeutic effects of XKY may due to its downregulation of hepatic cholesterol biosynthesis and modulation of the dysbiosis of the gut microbiota and metabolites.