Abstract Background Previous evidence indicates associations between the female reproductive tract microbiome composition and reproductive outcome in infertile patients undergoing assisted reproduction. We aimed to determine whether the endometrial microbiota composition is associated with reproductive outcomes of live birth, biochemical pregnancy, clinical miscarriage or no pregnancy. Methods Here, we present a multicentre prospective observational study using 16S rRNA gene sequencing to analyse endometrial fluid and biopsy samples before embryo transfer in a cohort of 342 infertile patients asymptomatic for infection undergoing assisted reproductive treatments. Results A dysbiotic endometrial microbiota profile composed of Atopobium, Bifidobacterium, Chryseobacterium, Gardnerella, Haemophilus, Klebsiella, Neisseria, Staphylococcus and Streptococcus was associated with unsuccessful outcomes. In contrast, Lactobacillus was consistently enriched in patients with live birth outcomes. Conclusions Our findings indicate that endometrial microbiota composition before embryo transfer is a useful biomarker to predict reproductive outcome, offering an opportunity to further improve diagnosis and treatment strategies. Video Abstract.