In conclusion, our results demonstrated that increased CD8+ T cells and CD56+ NK cells and decreased CD163+ macrophages within the eutopic endometria of women with endometriosis reveal a proinflammatory feature in the endometrial immune environment and that elevated CD8+ T cells increase the risk of infertility in women with the disease. This evidence concerns the gene NCAM1 and endometriosis.