Several intrauterine environmental factors can increase the future risk of type 2 diabetes. The microbiome can influence the balance between health and disease. However, the influence of the maternal gut microbiome on the future risk of diabetes in the fetus is unknown. The present study investigated the associations between maternal gut microbiome and differentially methylated regions of diabetes-associated genes in umbilical cord samples. The present study included 10 pregnant participants from a birth cohort study. 16S ribosomal ribonucleic acid metagenome analysis of maternal stool samples and deoxyribonucleic acid methylation assays of umbilical cord samples were carried out. The present study found that changes in the UBE2E2 and KCNQ1 methylation rates in umbilical cord samples were associated with the proportion of Firmicutes in the maternal gut, albeit with marginal correlations after adjustment for age and body mass index. These findings suggest a link between the methylation of diabetes-associated genes in fetuses and maternal microbiota components during pregnancy.