Background: We investigated the composition and dynamic changes of vaginal microbiota (VM) in pregnant women who underwent in vitro fertilization (IVF), as well as VM in relation to preterm birth. Methods: Sixteen women who conceived after IVF and 6 women who conceived naturally were recruited to the study. Vaginal samples from all participants were collected in the first, second, and third trimesters of pregnancy (T1, T2 and T3, respectively). The V3–V4 region of 16S rRNA was sequenced to assess the VM. Results: In all participants, the alpha-diversity indices Chao1 and observed species of VM were significantly higher in T1 compared to T2 and T3. Non-metric multi-dimensional scaling (NMDS) analysis of beta-diversity revealed the VM structure during T1 was significantly different between IVF and control groups, but then gradually converged during T3. A greater abundance of potential pathogenic bacteria and lower abundance of commensal bacteria was observed in the IVF group compared to control group during T1. Moreover, a higher abundance of Lactobacillus_iners, Escherichia_coli and Alloscardovia_omnicolens was found in preterm birth women who underwent IVF. Conclusions: The VM diversity decreased with increasing gestation in women who underwent IVF and in healthy controls. IVF-induced dysbiosis of the VM occurs mainly during T1 of gestation and may be related to preterm birth.