Foxtail millet and its components have hypoglycemic effects on mice, but the role of starch and protein in millet in these effects is unclear. The present study investigated the impact of heat-treated foxtail millet starch and protein on type 2 diabetic mice and the underlying mechanisms, including the influence of gut microbiota and serum metabolic profile. In diabetic mice, the consumption of heat-treated foxtail millet starch and protein reduced, respectively, fasting blood glucose 18.52% and 26.33% and insulin levels 12.22% and 15.96%. In addition, heat-treated foxtail millet starch and protein altered the gut microbiota composition, enriched the abundance of probiotics and short-chain fatty acids producing bacteria, reduced harmful bacteria, and increased fecal short-chain fatty acids concentration. Heat-treated foxtail millet protein had greater effects on gut microbiota composition, whereas heat-treated foxtail millet starch had greater effects on metabolic function. The hypoglycemic potential of heat-treated foxtail millet starch and protein was associated with the modulation of both gut microbiota and serum metabolic profile.