Background: In this study, the association between high-risk human papillomavirus (hrHPV) infection and the vaginal microbiome in pregnant women was evaluated in Chinese cohorts. Methods: The vaginal bacterial composition of four groups, 38 hrHPV-infected pregnant women (PHR, n = 38), pregnant women without HPV infection (PN, n = 48), nonpregnant women with hrHPV infection (NPHR, n = 19) and nonpregnant women without HPV infection (NPN, n = 30), was characterized by deep sequencing of barcoded 16S rRNA gene fragments (V3-4) using Illumina MiSeq. Results: The results revealed that both pregnancy and HPV infection can increase vaginal bacterial microbial richness and diversity, with the bacterial composition being most influenced by pregnancy. Lactobacillus was the most dominant genus among all samples. NPN samples were dominated by CST (community state type) III, mainly composed of Lactobacillus iners. Both pregnancy and hrHPV infection were accompanied by an increased proportion of CST I (dominated by Lactobacillus crispatus), as opposed to CST III. Bifidobacterium, Bacillus, Megasphaera, Sneathia, Prevotella, Gardnerella, Fastidiosipila and Dialister were found to be biomarkers for hrHPV-infected women, though different genera (Bifidobacterium, Megasphaera, Bacillus, Acidovorax, Oceanobacillus and Lactococcus) were associated with hrHPV-infected pregnant women. Conclusions: This work uncovered a probable synergistic effect of hrHPV infection and pregnancy on the vaginal microbial composition. HPV infection in pregnant women was associated with a more complex and diverse microbial environment.