To date, the cause of recurrent miscarriage (RM) in at least 50% of patients remains unknown. However, no study has explored the correlation between butyrate metabolism-related genes (BMRGs) and RM. RM-related datasets (GSE165004, GSE111974, GSE73025, and GSE179996) were obtained from the Gene Expression Omnibus (GEO) database. First, 595 differentially expressed genes (DEGs) were identified between the RM and control samples in GSE165004. Subsequently, 213 differentially expressed BMRGs (DE-BMRGs) were identified by considering the intersection of DEGs with BMRGs. The protein-protein interaction (PPI)network of DE-BMRGs contained 156 nodes and 250 edges, and a key module was obtained. In total, four biomarkers (ACTR2, ANXA2, PFN1, and OAS1) were acquired through least absolute shrinkage and selection operator (LASSO), support vector machine-recursive feature elimination (SVM-RFE), and random forest (RF). Immune analysis revealed two immune cells and three immune-related gene sets that were significantly different between the RM and control groups, namely, T helper cells, regulatory T cells (Treg), MHC class I, parainflammation, and type I IFN response. In addition, a TF-mRNA network based on the top 100 nodes ranked in the order of connectivity was created, including 100 nodes and 253 edges, such as MTERF2-ACTR2, NKX23-PFN1, STAT1-OAS1, and SP100-ANXA2. Finally, 3 drugs (withaferin A, N-ethylmaleimide, and etoposide) were predicted to interact with 2 biomarkers (ANXA2 and ACTR2). Eventually, ANXA2 and OAS1 were significantly downregulated, and PFN1 was markedly overexpressed in the RM group, as determined by reverse transcription quantitative polymerase chain reaction (RT-qPCR). Our findings authenticated four butyrate metabolism-related biomarkers for the diagnosis of RM, providing a scientific reference for further studies on RM treatment.