Introduction: In this study, our aim is to describe the intestinal microbiome structure of diabetes, and to establish a diagnostic model of diabetes mellitus based on intestinal microorganisms.Methods: The experimental group included 44 patients with diabetes, while the control group included 47 healthy patients without statistical differences in age, gender, smoking, drinking alcohol and other basic diseases after matching. Firstly, their population information, biochemical indicators, and stool samples were collected. Subsequently, the stool samples were conducted the next-generation sequencing of the 16S rRNA genes of fecal bacteria.Results: In this study, there were significant differences in alpha-diversity and beta-diversity between the two groups. Moreover, the differences within the group were analyzed by Adnois, finding that R2=0.031 and P=0.001. Through the LEfSe differential bacteria analysis, it was found that the distribution of differential bacteria between the two groups was significantly abnormal. Among them, the abundances of the genus faecalibacterium, the genus Prevotella, and the genus Roseburia were higher in the diabetes group, while the abundances of the genus Shigella and the genus Bifidobacterium were lower. In the correlation analysis between bacteria and clinical indicators, it was found that the genus Veillonella and the genus unclassified_Enterobacteriaceae were negatively related to blood glucose, while the genus Phascolarctobacterium, the genus unidentified_Bacteroidales and the genus Prevotella were significantly positively correlated with fasting blood glucose. Through 10-fold cross-validation of the random forest model, a total of 12 microbial markers were detected, and the area under the curve (AUC) was 84.1%. Notably, we conducted the combined analysis on the intestinal microbial markers and clinical variables, and found that the AUC was 90.8 %.Conclusions: In this study, it was found that the host intestinal microorganisms could predict the occurrence of diabetes, and its predictive ability was no less than that of fasting blood sugar. It can be seen that the intestinal microorganisms are closely related to the occurrence and development of diabetes.