Our results show that several mRNAs and pathways related to immune function, such as IL-1B, CXCR4, IL-7R, STAT4, CD14, and CCR5, as well as the FoxO signaling pathway, the Jak-STAT signaling pathway, and the NF-kappa B signaling pathway, have significant correlations with endometriosis. Here, STAT4 is linked to endometriosis.