BackgroundEndometriosis negatively affects fertility, and it is a common disease in assisted reproductive practice. Surgical removal of endometriotic lesions is widely carried out to relieve symptoms and promote fertility. But it is not intensively investigated what changes in the secretory eutopic endometrium of patients with endometriosis after surgery.MethodsEighteen patients with stage III/IV endometriosis were included in the study, and they were divided into the untreated group and the treated group (6 vs. 12). Basic clinical data were compared, and transcriptomic data of the secretory eutopic endometrium were analyzed with DESeq2, Cytoscape, ClueGO, CluePedia, and Gene Set Enrichment Analysis (GSEA). CIBERSORT was used to calculate the relative abundance of 22 immune cells in the samples.ResultsWe determined 346 differentially expressed genes (DEGs) using DESeq2. These DEGs were used to enrich seven Gene Ontology terms including three associated with immune processes and one correlated to prostaglandin using ClueGO and CluePedia. GSEA enriched 28 Gene Ontology terms in the treated group mainly associated with immune and blood pressure regulation process. Compared to the untreated group, the relative abundance of resting CD4+ memory T cells [0.218 (0.069, 0.334) vs. 0.332 (0.181, 0.429), P = 0.022] and the even less abundant memory B cells [0.001 (0.000, 0.083) vs. 0.033 (0.007, 0.057), P = 0.049] are significantly decreased in the treated group.ConclusionSurgical treatment of stage III/IV endometriosis influences some genes and biological processes related to endometrial receptivity, but more evidence is needed.