Berberine (BBR) has the beneficial effects of anti-inflammation, anti-bacteria, and antidiabetes. The clinical application of BBR has been hindered by its poor gastrointestinal absorption. Stachyose (Sta), a prebiotic agent, improves the composition of gut microbiota and benefits for diabetes. We therefore investigated whether Sta improves the anti-diabetic actions of BBR using KKAy mice. Here, we find that the combination of BBR and Sta is more effective than BBR alone in blood glucose control, improvement of insulin resistance and islet functions, inflammatory mediators decrease, and maintenance of intestinal barrier integrity. Gut microbiota analysis demonstrates that both BBR and combined administration enhance the abundance of Bacteroidaceae and Akkermansiaceae and decrease Lachnospiraceae levels, whereas Akkermansiaceae elevation due to the administration of BBR with Sta is more significant than BBR alone. Interestingly, the proportion of Lactobacillaceae increases with combination treatment, but is diminished by BBR. Additionally, BBR with Sta significantly reduces the concentrations of fecal shortchain fatty acids compared to BBR. Collectively, these results indicate that the combination of BBR and Sta imparts better effects on the maintenance of glycemia and intestinal homeostasis than BBR alone by modulating gut microbiota and short-chain fatty acids, thereby providing a novel approach for the treatment of type 2 diabetes mellitus.