Sclerotinia stem rot (SSR) is a severe disease of oilseed rape, which severely impacts the crop productivity worldwide. Sclerotinia sclerotiorum causes SSR, resulting in the secretion of oxalic acid (OA), which can be further degraded to carbon dioxide (CO2) and hydrogen peroxide (H2O2) by oxalate oxidase (OXO). In the present investigation, the barley oxalate oxidase (BOXO, Y14203) gene was introduced into oilseed rape by Agrobacterium-mediated transformation to investigate the mechanism by which OXO promotes resistance to S. sclerotiorum. Compared to the control 72 h post-inoculation, there were c. 15–61% fewer lesions on leaves of the transgenic oilseed rape, which thus exhibited a detectable level of partial resistance in leaf tissue to S. sclerotiorum. Transgenic oilseed rape also showed decreased oxalate and increased hydrogen peroxide levels compared to the control, and the expression of defence response genes involved in the hydrogen peroxide signalling pathway was also induced. Therefore, the improved resistance of oilseed rape could be attributed to the enhanced OA metabolism, production of hydrogen peroxide and the hydrogen peroxide-mediated defence levels during infection.