This prospective study investigates the correlation between vaginal microecology and pregnancy outcomes and explores their impact on endometrial microbiota composition during frozen embryo transfer (FET) cycles. Additionally, the impact of transvaginal Lactobacillus supplementation on reproductive outcomes in patients with previous failed cycles was assessed. A total of 379 patients undergoing FET at a reproductive medicine center were categorized into clinical pregnancy (CP), miscarriage (MISC), and non-pregnant (NP) groups. Vaginal specimens were collected for microecological evaluation prior to embryo transfer. Endometrial microbiota samples were obtained during embryo transfer for 16S rRNA gene sequencing analysis to assess endometrial microbiota composition. Vaginal microecological indicators, including pH, Lactobacillus dominance, and leukocyte esterase activity, were measured. Transvaginal Lactobacillus supplementation was investigated in 60 patients with previous failed cycles. Vaginal microecology significantly correlated with pregnancy outcomes, with normal microecology associated with a higher clinical pregnancy rate. Vaginal pH and leukocyte esterase activity were significantly associated with clinical pregnancy. Furthermore, vaginal microecological differences significantly impacted endometrial microbiota composition. However, no significant differences were observed in endometrial microbiota composition among the CP, MISC, and NP groups. Notably, transvaginal Lactobacillus supplementation increased the clinical pregnancy rate without affecting the miscarriage rate. This study highlights that normal vaginal microecology, characterized by lower pH and leukocyte esterase negativity, is associated with a higher likelihood of clinical pregnancy following FET. Importantly, vaginal microecological differences influence endometrial microbiota composition. Moreover, transvaginal Lactobacillus supplementation appears promising in improving clinical pregnancy rates in patients with previous failed cycles. These findings contribute to a better understanding of the interplay between vaginal and endometrial microbiota and offer potential interventions to enhance reproductive success in assisted reproductive technologies.