Background. Endometriosis is an inflammatory gynecological disease leading to deep pelvic pain, dyspareunia, and infertility. The pathophysiology of endometriosis is complex and depends on a variety of biological processes and pathways. Therefore, there is an urgent need to identify reliable biomarkers for early detection and accurate diagnosis to predict clinical outcomes and aid in the early intervention of endometriosis. We screened transcription factor- (TF-) immune-related gene (IRG) regulatory networks as potential biomarkers to reveal new molecular subgroups for the early diagnosis of endometriosis. Methods. To explore potential therapeutic targets for endometriosis, the Gene Expression Omnibus (GEO), Immunology Database and Analysis Portal (ImmPort), and TF databases were used to obtain data related to the recognition of differentially expressed genes (DEGs), differentially expressed IRGs (DEIRGs), and differentially expressed TFs (DETFs). Gene Ontology (GO) and Kyoto Encyclopedia of Genes and Genomes (KEGG) pathway enrichment analyses were performed on the DETFs and DEIRGs. Then, DETFs and DEIRGs were further validated in the external datasets of GSE51981 and GSE1230103. Then, we used quantitative real-time polymerase chain reaction (qRT-PCR) to verify the hub genes. Simultaneously, the Pearson correlation analysis and protein-protein interaction (PPI) analyses were used to indicate the potential mechanisms of TF-IRGs at the molecular level and obtain hub IRGs. Finally, the receiver operating characteristic (ROC) curve analysis was used to assess the diagnostic value of the hub IRGs. Results. We screened a total of 94 DETFs and 121 DEIRGs in endometriosis. Most downregulated DETFs showed decreased expression in the endometria of moderate/severe endometriosis patients. The top-ranked upregulated DEIRGs were upregulated in the endometra of infertile women. Functional analysis showed that DETFs and DEIRGs may be involved in the biological behaviors and pathways of endometriosis. The TF-IRG PPI network was successfully constructed. Compared with the control group, high C3, VCAM1, ITGB2, and C3AR1 expression had statistical significance in endometriosis among the hub DEIRGs. They also showed higher sensitivity and specificity by ROC analysis for the diagnosis of endometriosis. Finally, compared with controls, C3 and VCAM1 were highly expressed in endometriosis tissue samples. In addition, they also showed high specificity and sensitivity for diagnosing endometriosis. Conclusion. Overall, we discovered the TF-IRG regulatory network and analyzed 4 hub IRGs that were closely related to endometriosis, which contributes to the diagnosis of endometriosis. Additionally, we verified that DETFs or DEIRGs were associated with the clinicopathological features of endometriosis, and external datasets also confirmed the hub IRGs. Finally, C3 and VCAM1 were highly expressed in endometriosis tissue samples compared with controls and may be potential biomarkers of endometriosis, which are helpful for the early diagnosis of endometriosis.