Geniposide, an iridoid glycoside isolated from Gardenia, has neuroprotective activities against oxidative stress and inflammation. The present study investigated the in vivo protective effect of geniposide on ischemia/reperfusion-injured rats by middle cerebral artery occlusion (MCAO), and the inhibitory effects of geniposide and mechanisms against activation of microglial cells by oxygen-glucose deprivation (OGD) in vitro. Male SD rats were subjected to treatment with geniposide at 15, 30 and 60 mg/kg immediately after MCAO. Cerebral infarct volume and microglial cell activation were assessed following 24 h reperfusion. Cultured primary rat microglial cells were exposed to geniposide at the concentrations of 12.5, 25 and 50 mu g/mL during 4 h of OGD. The effects of geniposide were evaluated in terms of (1) cell viability; (2) secretion of TNF-alpha, IL-1 beta, IL-6, IL-8 and IL-10 into culture media; (3) TLR4 mRNA expression; (4) protein expression of TLR4, p-ERK1/2, p-I kappa B, p-p38, nuclear and cytoplasmic fraction NF-kappa B p65; and (5) nuclear transfer of NF-kappa B p65. Geniposide reduced the infarct volume and inhibited the activation of microglial cells in ischemic penumbra in vivo. OGD increased cell viability and release of TNF-alpha, IL-1 beta, IL-6, IL-8 and IL-10, these effects were suppressed by geniposide. Geniposide also attenuated the increases in the OGD-induced TLR4 mRNA and protein levels. In addition, geniposide at 25 and 50 mu g/mL downregulated the phosphorylation of ERK, I kappa B and p38, as well as inhibited nuclear transcriptional activity triggered via NF-kappa B p65 in microglial cells by OGD. In conclusion, geniposide displays a neuroprotective effect on ischemia/reperfusion-injured rats in vivo and inhibits OGD-induced activation of microglial cells by attenuating inflammatory factors and NF-kappa B activation in vitro.