Inflammatory damage plays an important role in cerebral ischemic pathogenesis and represents a new target for treatment of stroke. Berberine is a natural medicine with multiple beneficial biological activities. In this study, we explored the mechanisms underlying the neuroprotective action of berberine in mice subjected transient middle cerebral artery occlusion (tMCAO). Male mice were administered berberine (25, 50 mg/kg/d, intragastric; i.g.), glycyrrhizin (50 mg/kg/d, intraperitoneal), or berberine (50 mg/ kg/d, i.g.) plus glycyrrhizin (50 mg/kg/d, intraperitoneal) for 14 consecutive days before tMCAO. The neurological deficit scores were evaluated at 24 h after tMCAO, and then the mice were killed to obtain the brain samples. We showed that pretreatment with berberine dose-dependently decreased the infarct size, neurological deficits, hispathological changes, brain edema, and inflammatory mediators in serum and ischemic cortical tissue. We revealed that pretreatment with berberine significantly enhanced uptake of 18 F-fluorodeoxyglucose of ischemic hemisphere comparing with the vehicle group at 24 h after stroke. Furthermore, pretreatment with berberine dose-dependently suppressed the nuclear-to cytosolic translocation of high-mobility group box1 (HMGB1) protein, the cytosolic-to nuclear translocation of nuclear factor kappa B (NF-κB) and decreased the expression of TLR4 in ischemic cortical tissue. Moreover, co-administration of glycyrrhizin and berberine exerted more potent suppression on the HMGB1/TLR4/NF-κB pathway than berberine or glycyrrhizin administered alone. These results demonstrate that berberine protects the brain from ischemia-reperfusion injury and the mechanism may rely on its anti-inflammatory effects mediated by suppressing the activation of HMGB1/TLR4/NF-κB signaling.