As one of main active ingredients of salvia miltiorrhizae, which is a traditional Chinese medicine, tanshinone IIA is the basis of its pharmacological activities. In the present study, the effect of tanshinone IIA on weakening spastic cerebral palsy (SCP) in neonatal rats was investigated. Radial arm water maze and holding tests were used to measure the alterations of spastic cerebral palsy, inflammation was measured using an ELISA kit, and western blot analysis was used to analyze the protein expression of p‑p38 mitogen‑activated protein kinase (MAPK) and vascular endothelial growth factor (VEGF). The central mechanisms involved in the mediation or modulation of inflammation, p‑p38 MAPK and VEGF were also investigated. Treatment with tanshinone IIA effectively inhibited spastic cerebral palsy, and the activities of interleukin (IL)‑1β, IL‑6, tumor necrosis factor‑α, monocyte chemoattractant protein 1, cyclooxygenase‑2 and prostaglandin E2 in a neonatal rat model of SCP. Tanshinone IIA effectively suppressed the protein expression of inducible nitric oxide synthase (NOS), phosphorylated (p‑) nuclear factor (NF)‑κB, p‑p38MAPK and VEGF, and activated the phosphorylation of inhibitor of NF‑κB and the protein expression of neuronal NOS in the SCP rat model. These results suggested that the neuroprotective effect of tanshinone IIA weakened SCP through inflammation, p38MAPK and VEGF in the neonatal rats.