Diabetes is a type of metabolic disease associated with changes in the intestinal flora. In this study, the regulatory effect of millet bran on intestinal microbiota in a model of type 2 diabetes (T2DM) was investigated in an effort to develop new approaches to prevent and treat diabetes and its complications in patients. The effect of purified millet bran polysaccharide (MBP) with three different intragastric doses (400 mg/kg, 200 mg/kg, and 100 mg/kg) combined with a high-fat diet was determined in a streptozotocin (STZ)-induced model of T2DM. By analyzing the changes in indicators, weight, fasting blood sugar, and other bio-physiological parameters, the changes in gut microbiota were analyzed via high-throughput sequencing to establish the effect of MBP on the intestinal flora. The results showed that MBP alleviated symptoms of high-fat diet-induced T2DM. A high dosage of MBP enhanced the hypoglycemic effects compared with low and medium dosages. During gavage, the fasting blood glucose (FBG) levels of rats in the MBP group were significantly reduced (p < 0.05). The glucose tolerance of rats in the MBP group was significantly improved (p < 0.05). In diabetic mice, MBP significantly increased the activities of CAT, SOD, and GSH-Px. The inflammatory symptoms of liver cells and islet cells in the MBP group were alleviated, and the anti-inflammatory effect was partially correlated with the dose of MBP. After 4 weeks of treatment with MBP, the indices of blood lipid in the MBP group were significantly improved compared with those of the DM group (p < 0.05). Treatment with MBP (400 mg/kg) increases the levels of beneficial bacteria and decreases harmful bacteria in the intestinal tract of rats, thus altering the intestinal microbial community and antidiabetic effect on mice with T2DM by modulating gut microbiota. The findings suggest that MBP is a potential pharmaceutical supplement for preventing and treating diabetes.