Introduction: Ji-Ni-De-Xie (JNDX) is a traditional herbal preparation in China. It is widely used to treat type 2 diabetes mellitus (T2DM) in traditional Tibetan medicine system. However, its antidiabetic mechanisms have not been elucidated. The aim of this study is to elucidate the underlying mechanism of JNDX on bile acids (BAs) metabolism and FXR/FGF15 signaling pathway in T2DM rats.Methods: High-performance liquid chromatography-triple quadrupole mass spectrometry (HPLC-QQQ-MS) and UPLC-Q-Exactive Orbitrap MS technology were used to identify the constituents in JNDX. High-fat diet (HFD) combined with streptozotocin (45 mg∙kg−1) (STZ) was used to establish a T2DM rat model, and the levels of fasting blood-glucose (FBG), glycosylated serum protein (GSP), homeostasis model assessment of insulin resistance (HOMA-IR), LPS, TNF-α, IL-1β, IL-6, TG, TC, LDL-C, HDL-C, and insulin sensitivity index (ISI) were measured to evaluate the anti-diabetic activity of JNDX. In addition, metagenomic analysis was performed to detect changes in gut microbiota. The metabolic profile of BAs was analyzed by HPLC-QQQ-MS. Moreover, the protein and mRNA expressions of FXR and FGF15 in the colon and the protein expressions of FGF15 and CYP7A1 in the liver of T2DM rats were measured by western blot and RT-qPCR.Results: A total of 12 constituents were identified by HPLC-QQQ-MS in JNDX. Furthermore, 45 chemical components in serum were identified from JNDX via UPLC-Q-Exactive Orbitrap MS technology, including 22 prototype components and 23 metabolites. Using a T2DM rat model, we found that JNDX (0.083, 0.165 and 0.33 g/kg) reduced the levels of FBG, GSP, HOMA-IR, LPS, TNF-α, IL-1β, IL-6, TG, TC, and LDL-C, and increased ISI and HDL-C levels in T2DM rats. Metagenomic results demonstrated that JNDX treatment effectively improved gut microbiota dysbiosis, including altering some bacteria (e.g., Streptococcus and Bacteroides) associated with BAs metabolism. Additionally, JNDX improved BAs disorder in T2DM rats, especially significantly increasing cholic acid (CA) levels and decreasing ursodeoxycholic acid (UDCA) levels. Moreover, the protein and mRNA expressions of FXR and FGF15 of T2DM rats were significantly increased, while the expression of CYP7A1 protein in the liver was markedly inhibited by JNDX.Discussion: JNDX can effectively improve insulin resistance, hyperglycemia, hyperlipidemia, and inflammation in T2DM rats. The mechanism is related to its regulation of BAs metabolism and activation of FXR/FGF15 signaling pathway.