Dysregulated endoplasmic reticulum stress (ERS) is associated with recurrent spontaneous abortion (RSA) and is involved in the mechanisms that govern immune balance and vascular regulation at the maternal-fetal interface. The molecular intricacies of these mechanisms remain elusive. This study employed microarray and bioinformatics techniques to examine genetic abnormalities in endometrial tissues from RSA patients, with the objective of identifying potential ERS-related biomarkers. By integrating two publicly available microarray datasets, consisting of 88 RSA and 42 control samples, we conducted an extensive analysis, including differential expression, functional annotation, molecular interactions, and immune cell infiltration. Analysis of immune cell characteristics suggests an inflammatory immune imbalance as a potential contributor to RSA progression. Both innate and adaptive immunity were found to play roles in RSA development, with M1 macrophages constituting a significant proportion of immune infiltration. We identified five key ERS-associated genes (TMEM33, QRICH1, MBTPS2, ERN1, and BAK1) linked to immune-related mechanisms, with RT-qPCR results aligning with bioinformatics findings. Our research findings offer a fresh and comprehensive perspective on the ERS-related genes' pathways and interaction networks, offering significant insights for the advancement of innovative therapy techniques for RSA.