Danshen injection (DI) is effective in treating cardiovascular and cerebrovascular diseases, including ischemic stroke (IS), including IS, but its mechanism is unclear. A middle cerebral artery occlusion model was used to simulate ischemia/reperfusion (I/R) injury in SD rats. Overexpression of hypoxia-inducible factor 1α (HIF-1α) was achieved by AAV-HIF-1α. Rats were treated with DI or saline. Neurological scores and infarction rates were assessed. I/R damage was examined by HE, 2,3,5-triphenyltetrazolium and Nissl stainings. Expression levels of relative proteins [TNF-α, IL-6, IL-1β, SOD, MDA, ROS, HIF-1α, CXC chemokine receptor 4 (CXCR4) and NF-κB] were measured. DI treatment improved neurological scores and reduced infarction rates, suggesting that it inhibits inflammation and oxidative stress. The expression levels of HIF-1α, CXCR4 and NF-κB were decreased. However, the effectiveness of DI on inflammation inhibition was lost after HIF-1α overexpression. DI may directly target HIF-1α to suppress neuroinflammation and reduce I/R injury by suppressing the HIF-1α/CXCR4/NF-κB signaling pathway.