Cerebral ischemic and reperfusion injury often accompany with inflammation, and lead to severe neuronal damage, which further result in neurological disorders and memory disorders. In this study, we researched XQ-1H, a novel derivative of ginkgolide B, protecting against ischemic stroke in mice through regulation of microglia polarization. Middle cerebral artery occlusion (MCAO)/reperfusion in mice is applied to mimic ischemic stroke in vivo. Immediately after MCAO, mice are intragastric administrated with different dose (31 or 62 mg/kg) of XQ-1H for one or continuative three days. The in vivo experiments indicated that post-treatment with XQ-1H decreased cerebral infarction size, lessened brain edema, improved behavior and memory recover, inhibited pro-inflammatory and promoted anti-inflammatory cytokines expression and releasing in MCAO mice. Oxygen-glucose deprivation/reoxygenation (OGD/R) injury in BV-2 (microglia) cells is served in vitro. The in vitro findings revealed that incubation with XQ-1H protected against BV2 from OGD/R injury, regulated BV2 polarized from pro-inflammatory into anti-inflammatory phenotype, and promoted PPARγ mobilizing from nuclear to cytoplasm. In conclusion, the present study demonstrates that XQ-1H alleviated ischemic stroke by regulating balance of pro-/anti-inflammatory microglia polarization through PPARγ pathway both in vivo and in vitro, offering an alternative medication for stroke associated with inflammation.