Microglia-mediated neuroinflammation plays a vital role in the pathogenesis of ischemic stroke, which serves as a prime target for developing novel therapeutic agent. However, feasible and effective agents for controlling neuroinflammation are scarce. Bergapten were acknowledged to hold therapeutic potential in restricting inflammation in multiple diseases, including peripheral neuropathy, migraine headaches and osteoarthritis. Here, we aimed to investigate the impact of bergapten on microglia-mediated neuroinflammation and its therapeutic potential in ischemic stroke. Our study demonstrated that bergapten significantly reduced the expression of pro-inflammatory cytokines and the activation of NF-κB signaling pathway in LPS-stimulated primary microglia. Mechanistically, bergapten suppressed cellular potassium ion efflux by inhibiting Kv1.3 channel and inhibits the degradation of Carbonyl reductase 1 induced by LPS, which might contribute to the anti-inflammatory effect of bergapten. Furthermore, bergapten suppressed microglial activation and post-stroke neuroinflammation in an experimental stroke model, leading to reduced infarct size and improved functional recovery. Thus, our study identified that bergapten might be a potential therapeutic compound for the treatment of ischemic stroke.