T2DM etiology differs among Asians and Caucasians and may be associated with gut microbiota influenced by different diet patterns. However, the association between fecal bacterial composition, enterotypes, and T2DM susceptibility remained controversial. We investigated the fecal bacterial composition, co-abundance network, and metagenome function in US adults with T2DM compared to healthy adults based on enterotypes. We analyzed 1911 fecal bacterial files of 1039 T2DM and 872 healthy US adults from the Human Microbiome Projects. Operational taxonomic units were obtained after filtering and cleaning the files using Qiime2 tools. Machine learning and network analysis identified primary bacteria and their interactions influencing T2DM incidence, clustered into enterotypes, Bacteroidaceae (ET-B), Lachnospiraceae (ET-L), and Prevotellaceae (ET-P). ET-B showed higher T2DM incidence. Alpha-diversity was significantly lower in T2DM in ET-L and ET-P (p< 0.0001), but not in ET-B. Beta-diversity revealed a distinct separation between T2DM and healthy groups across all enterotypes (p< 0.0001). The XGBoost model exhibited high accuracy and sensitivity.Enterocloster bolteae,Facalicatena fissicatena,Clostridium symbiosum, andFacalibacterium prausnitiziiwere more abundant in the T2DM group than in the healthy group.Bacteroides koreensis,Oscillibacter ruminantium,Bacteroides uniformis, andBlautia wexleraewere lower in the T2DM than in the healthy group regardless of the enterotypes in the XGBoost model (p< 0.0001). However, the patterns of microbial interactions varied among different enterotypes affecting T2DM risk. The interaction between fecal bacteria was more tightly regulated in the ET-L than in the ET-B and ET-P groups (p< 0.001). Metagenomic analysis revealed an inverse association between bacteria abundance in T2DM, energy utility, butanoate and propanoate metabolism, and the insulin signaling pathway (p< 0.0001). In conclusion, fecal bacteria play a role in T2DM pathogenesis, particularly within different enterotypes, providing valuable insights into the link between gut microbiota and T2DM in the US population.