IntroductionYu–Ye Tang (YYT) is a classical formula widely used in treatment of type 2 diabetes mellitus (T2DM). However, the specific mechanism of YYT in treating T2DM is not clear.MethodsThe aim of this study was to investigate the therapeutic effect of YYT on T2DM by establishing a rat model of T2DM. The mechanism of action of YYT was also explored through investigating gut microbiota and serum metabolites.ResultsThe results indicated YYT had significant therapeutic effects on T2DM. Moreover, YYT could increase the abundance of Lactobacillus, Candidatus_Saccharimonas, UCG-005, Bacteroides and Blautia while decrease the abundance of and Allobaculum and Desulfovibrio in gut microbiota of T2DM rats. Nontargeted metabolomics analysis showed YYT treatment could regulate arachidonic acid metabolism, alanine, aspartate and glutamate metabolism, arginine and proline metabolism, glycerophospholipid metabolism, pentose and glucuronate interconversions, phenylalanine metabolism, steroid hormone biosynthesis, terpenoid backbone biosynthesis, tryptophan metabolism, and tyrosine metabolism in T2DM rats.DiscussionIn conclusion, our research showed that YYT has a wide range of therapeutic effects on T2DM rats, including antioxidative and anti-inflammatory effects. Furthermore, YYT corrected the altered gut microbiota and serum metabolites in T2DM rats. This study suggests that YYT may have a therapeutic impact on T2DM by regulating gut microbiota and modulating tryptophan and glycerophospholipid metabolism, which are potential key pathways in treating T2DM.