Intestinal microbiota is closely associated with various metabolic diseases such as type 2 diabetes (T2D), and microbiota is definitely affected by diet. However, more work is required to gain detailed information about gut metagenome and their associated impact with diet in T2D patients. We used a streptozotocin-high-fat diet (HFD) to induce a T2D mouse model and investigated the effect of standard chow diet and HFD on the composition and function of gut microbiota. We found that a HFD could worsen the diabetes status compared with a standard diet. 16S rRNA gene sequencing revealed that a HFD caused a large disturbance to the microbial structure and was linked to an increased ratio of Firmicutes to Bacteroidetes. A HFD increased the bacteria of the Ruminococcaceae and Erysipelotrichaceae family and decreased the bacteria of S24-7 and Rikenellaceae. Meanwhile, a HFD decreased the abundance of Parabacteroides distasonis and Eubacterium dolichum, both of which have previously been reported to alleviate obesity and metabolic dysfunctions. Moreover, PICRUSt-predicted KEGG pathways related to membrane transport, lipid metabolism, and xenobiotics biodegradation and metabolism were significantly elevated in HFD-fed T2D mice. Our results provide insights into dietary and nutritional approaches for improving host metabolism and ameliorating T2D.