Introduction: Recurrent implantation failure (RIF) is a distressing problem in assisted reproductive technology (ART). Immunity plays a vital role in recurrent implantation failure (RIF) occurrence and development, but its underlying mechanism still needs to be fully elucidated. Through bioinformatics analysis, this study aims to identify the RIF-associated immune cell types and immune-related genes.Methods: The differentially expressed genes (DEGs) were screened based on RIF-associated Gene Expression Omnibus (GEO) datasets. Then, the enrichment analysis and protein-protein interaction (PPI) analysis were conducted with the DEGs. The RIF-associated immune cell types were clarified by combining single sample gene set enrichment analysis (ssGSEA) and CIBERSORT. Differentially expressed immune cell types-related modules were identified by weighted gene co-expression network analysis (WGCNA) and local maximal quasi-clique merger (lmQCM) analysis. The overlapping genes between DEGs and genes contained by modules mentioned above were delineated as candidate hub genes and validated in another two external datasets. Finally, the microRNAs (miRNAs) and long non-coding RNAs (lncRNAs) that interacted with hub genes were predicted, and the competing endogenous RNA (ceRNA) regulatory network was structured.Results: In the present study, we collected 324 DEGs between RIF and the control group, which functions were mainly enriched in immune-related signaling pathways. Regarding differential cell types, the RIF group had a higher proportion of activated memory CD4 T cells and a lower proportion of γδ T cells in the endometrial tissue. Finally, three immune-related hub genes (ALOX5AP, SLC7A7, and PTGS2) were identified and verified to effectively discriminate RIF from control individuals with a specificity rate of 90.8% and a sensitivity rate of 90.8%. In addition, we constructed a key ceRNA network that is expected to mediate molecular mechanisms in RIF.Conclusion: Our study identified the intricate correlation between immune cell types and RIF and provided new immune-related hub genes that offer promising diagnostic and therapeutic targets for RIF.