Embryo implantation is a key step in human reproduction, and the endometrium plays a key role in this process. Changes in the receptive state of the endometrium are one of the main reasons for embryo implantation failure. However, the mechanism underlying the altered endometrial receptivity remains unclear. In this study, we recruited 140 women undergoing assisted reproductive technology and divided them into a shifting group and a normal group based on their embryo implantation window results. Endometrial transcriptome data suggested that changes in the remodeling process of decidual spiral arterioles and changes in the immune environment might be important mechanisms of implantation window shift. The functional enrichment analysis results also suggested that the changes in microbiota had an important role in the changes in endometrial status. The endometrial functionally active microbial profiles were obtained based on previously validated metatranscriptomic analysis pipelines. Combining host gene expression information, immune cell abundance information and functionally active microbial abundance and activity information, we found that Treponema succinifaciens, Fusobacterium sp. oral taxon 203 and other potentially harmful species may over-activate Eicosapentaenoic acid (EPA) biosynthesis Thus, the balance of the immune environment of the endometrium is disrupted, resulting in the shift of the implantation window and the failure of embryo implantation. • Endometrial microbes were closely associated with decreased endometrial receptivity. • The disruption of endometrial immune balance is an important reason for the decline of endometrial receptivity. • The potentially harmful species might damage the immune environment balance of the endometrium by over activating the biosynthesis of EPA, leading to the deviation of the implantation window. [ABSTRACT FROM AUTHOR]