Background: The present study aimed to investigate the potential association between oral and intestinal microbiotas of pregnant women with periodontitis and/or gestational diabetes mellitus (GDM) in the second trimester. Methods: Four groups were defined: periodontitis (n = 28), GDM (n = 7), periodontitis + GDM (n = 7), and periodontitis-and GDM-free controls (n = 27). The oral and intestinal microbiomes were analyzed using the 16S rRNA sequencing technique. Results: Periodontitis alone significantly decreased the oral microbial diversity (by Shannon index, p = 0.003) and changed the structure of the oral microbial community (by AMOVA, p 0.001). GDM alone significantly increased the oral microbial diversity (by Shannon index, p = 0.049), and when combined with periodontitis, GDM significantly decreased the intestinal microbial richness (by observed species, p = 0.018) and influenced the structure of intestinal microbial community (by AMOVA, p = 0.043). The differentially abundant microbial taxa among different groups in both oral and intestinal samples were identified by LEfSe analysis, and limited taxa showed consistent trends. The numbers and ratios of oral-intestinal shared operational taxonomical units were the least in the periodontitis + GDM group. Conclusions: A close relationship between the oral microbiota and pregnant periodontitis was shown. Significant changes occur in both the oral and intestinal microbiomes when periodontitis was coupled with GDM. A separate influence of periodontitis and GDM on the oral and intestinal microbiotas may be indicated.