During testicular ischemia-reperfusion, overproduction of reactive oxygen species is associated with testicular injury. We injected hydrogen peroxide (a representative of reactive oxygen species) into normal testis via the testicular artery. The experiment demonstrates that reactive oxygen species can cause spermatogenic injury. Salvianolic acid B, the most abundant bioactive component in Salvia miltiorrhiza Bunge, has been reported to possess a potent antioxidant activity. This study was conducted to evaluate the effect of salvianolic acid B on testicular ischemia-reperfusion injury in a rat testicular torsion-detorsion model. Rats were randomly separated into three groups, including 20 rats in each group: control group with sham operation, testicular ischemia-reperfusion group, and testicular ischemia-reperfusion + salvianolic acid B-treated group. In the testicular ischemia-reperfusion group, left testicular torsion of 720° for 2 hours was induced, and then testicular detorsion was carried out. Rats in the salvianolic acid B-treated group additionally had salvianolic acid B administered intravenously at detorsion. At 4 hours after detorsion, testes of 10 rats from each group were collected to analyze the protein expression of xanthine oxidase which catalyzes generation of reactive oxygen species and malondialdehyde concentration (an indirect indicator of reactive oxygen species). At 3 months after detorsion, testes of the remaining 10 rats from each group were collected to analyze spermatogenesis. Compared with the control group, xanthine oxidase protein expression and malondialdehyde concentration in ipsilateral testes of testicular ischemia-reperfusion group increased significantly, while spermatogenesis decreased significantly. In the salvianolic acid B-treated group, xanthine oxidase protein expression and malondialdehyde concentration in ipsilateral testes decreased significantly, while spermatogenesis increased significantly, compared with the testicular ischemia-reperfusion group. These results suggest that salvianolic acid B can attenuate testicular torsion/detorsion-induced ischemia/reperfusion injury by downregulating the xanthine oxidase protein expression to inhibit reactive oxygen species formation.