Brain damage, including blood-brain barrier (BBB) dysfunction, neurological behavior deficit, cerebral infarction and inflammation, is commonly caused by ischemic-reperfusion (I/R) injury. Prevention of the above biological process defects is considered beneficial for patient recovery after I/R injury. This study was aimed to assess the neuroprotective effect of Gastrodin (GAS), an herbal agent, in experimentally induced cerebral ischemia. Sprague-Dawley adult rats were randomly divided into six groups: Sham-operated control group (Sham), middle cerebral artery occlusion (MCAO) group, GAS (50, 100, and 200 mg/kg) pretreatment + MCAO groups (GAS) and Nimodipine (NIM) + MCAO, namely, the NIM group. Additionally, an OGD/R model using BV-2 microglia was established in vitro to simulate I/R injury. We showed here that the neurological scores of rats in the GAS groups were significantly improved compared with the MCAO group. Moreover, the area of cerebral infarction in the GAS pretreatment groups and the NIM group was significantly reduced. Furthermore, Evans blue leakage volume was significantly reduced with GAS pretreatment notably at dose 100 mg/kg. Expression of matrix metalloproteinase 2 (MMP2) and MMP9 in GAS groups was markedly decreased when compared with MCAO group. In BV-2 microglia exposed to OGD/R given GAS pretreatment, MMP2 and MMP9 positive cells were reduced in numbers. The present results have shown that GAS pretreatment significantly compensated for neurological behavior defects in rats with I/R-induced injury, reduced brain infarction size, reversed BBB impairment, and attenuated inflammation. It is suggested that pretreatment with GAS before surgery is beneficial during recovery from I/R injury.