Myeloid differentiation primary response gene 88 (MyD88), a downstream molecule directly linked to Toll-like receptor (TLRs) and IL1 receptor, has been implicated in ischemia-reperfusion injury across various organs. However, its role in cerebral ischemia-reperfusion injury (CIRI) remains unclear. Five transient middle cerebral artery occlusion (tMCAO) microarray datasets were obtained from the Gene Expression Omnibus (GEO) database. We screened these datasets for differentially expressed genes (DEGs) using the GSE35338 and GSE58720 datasets and performed weighted gene co-expression network analysis (WGCNA) using the GSE30655, GSE28731, and GSE32529 datasets to identify the core module related to tMCAO. A protein–protein interaction (PPI) network was constructed using the intersecting DEGs and genes in the core module. Finally, we identified Myd88 was the core gene. In addition, Kyoto Encyclopedia of Genes and Genomes (KEGG) and Gene Set Enrichment Analysis (GSEA) validated that TNFα, IL17, and MyD88 signaling pathways were significantly enriched in tMCAO. Subsequently, we investigated the mechanistic role of MyD88 in the tMCAO model using male C57BL/6 mice. MyD88 expression increased significantly 24 h after reperfusion. After intraperitoneal administration of TJ-M2010-5, a MyD88-specific inhibitor, during reperfusion, the infarction volumes in the mice were ameliorated. TJ-M2010-5 inhibits the activation of microglia and astrocytes. Moreover, it attenuates the upregulation of inflammatory cytokines TNFα, IL17, and MMP9 while preserving the expression level of ZO1 after tMCAO, thereby safeguarding against blood-brain barrier (BBB) disruption. Finally, our findings suggest that MyD88 regulates the IRAK4/IRF5 signaling pathway associated with microglial activation. MyD88 participates in CIRI by regulating the inflammatory response and BBB damage following tMCAO.