Despite the success of single-cell RNA sequencing in identifying cellular heterogeneity in ischemic stroke, clarifying the mechanisms underlying these associations of differently expressed genes remains challenging. Several studies that integrate gene expression and gene expression quantitative trait loci (eQTLs) with genome wide-association study (GWAS) data to determine their causal role have been proposed. Here, we combined Mendelian randomization (MR) framework and single cell (sc) RNA sequencing to study how differently expressed genes (DEGs) mediating the effect of gene expression on ischemic stroke. The hub gene was further validated in the invitro model. We identified 2339 DEGs in 10 cell clusters. Among these DEGs, 58 genes were associated with the risk of ischemic stroke. After external validation with eQTL dataset, lactate dehydrogenase B (LDHB) is identified to be positively associated with ischemic stroke. The expression of LDHB has also been validated in sc RNA-seq with dominant expression in microglia and astrocytes, and melatonin is able to reduce the LDHB expression and activity invitro ischemic models. Our study identifies LDHB as a novel biomarker for ischemic stroke via combining the sc RNA-seq and MR analysis.