The aim of this study was to investigate the impact and underlying molecular mechanisms of electroacupuncture on mice with poststroke depression (PSD). Mice were randomly allocated into sham, PSD, and electroacupuncture groups. Mice in the PSD and electroacupuncture groups underwent middle cerebral artery occlusion (MCAO) surgery following with sedentary behavior. Electroacupuncture targeting Zusanli (ST36) acupoint was performed 24 h after MCAO for 4 weeks in electroacupuncture group. The sucrose preference test, forced swimming test, open field test, tail suspension test, elevated plus maze, Catwalk analysis, RNA sequencing, Nissl staining, Golgi staining, TUNEL staining, Edu labeling, and doublecortin staining were performed. Lymphocyte subsets in peripheral blood and the levels of IL-1β, IL-6, TNF-α, and expression of Iba1/CD86, Iba1/NLRP3, TLR4/p38/NF-κB/NLRP3 pathways in the hippocampus were detected. Electroacupuncture effectively protected against the development of depression-like symptoms. The number of granulosa cells and doublecortin-positive cells in the dentate gyrus (DG) were significantly decreased in PSD group, which were significantly upregulated ( P < 0.01) by electroacupuncture. Electroacupuncture also significantly reduced ( P < 0.05) TUNEL-positive cells in the DG and CA1. RNA-seq revealed that electroacupuncture may exert antidepressant effect by regulating the inflammation mediated by TLR4/NF-κB/NLRP3 pathway in hippocampus. Electroacupuncture remarkably elevated ( P < 0.01) the ratio of CD4+ to CD8+ T cells and percentage of CD3-CD49b+ cells in CD45+CD49b+ cells in the peripheral blood. Electroacupuncture significantly reduced ( P < 0.05) the high levels of IL-1β, IL-6, TNF-α, iba1, TLR4, p-p38, p-NF-κB, and NLRP3 and sedentary behavior. Electroacupuncture was observed to mitigate depression symptoms and increase hippocampal neurogenesis in mice with PSD, possibly by inhibiting TLR4/p38/NF-κB/NLRP3 pathways and improving the microglia-mediated inflammatory microenvironment in the hippocampus.