Infertility occurs in 15% of couples worldwide. Recurrent implantation failure (RIF) is one of the major problems in in vitro fertilization and embryo transfer (IVF–ET) programs, and how to manage patients with RIF to achieve successful pregnancy outcomes remains unresolved. Here, a uterine polycomb repressive complex 2 (PRC2)-regulated gene network was found to control embryo implantation. Our RNA-seq analyses of the human peri-implantation endometrium obtained from patients with RIF and fertile controls revealed that PRC2 components, including its core enzyme enhancer of zeste homolog 2 (EZH2)-catalyzing H3K27 trimethylation (H3K27me3) and their target genes are dysregulated in the RIF group. Although fertility of uterine epithelium-specific knockout mice ofEzh2(eKO mice) was normal,Ezh2-deleted mice in the uterine epithelium and stroma (uKO mice) exhibited severe subfertility, suggesting that stromal Ezh2 plays a key role in female fertility. The RNA-seq and ChIP-seq analyses revealed that H3K27me3-related dynamic gene silencing is canceled, and the gene expression of cell-cycle regulators is dysregulated inEzh2-deleted uteri, causing severe epithelial and stromal differentiation defects and failed embryo invasion. Thus, our findings indicate that the EZH2–PRC2–H3K27me3 axis is critical to preparing the endometrium for the blastocyst invasion into the stroma in mice and humans.