The growth and yield of rapeseed are severely affected by drought, which will result in considerable economic loss. A drought-resistant gene OsWRKY45 mediated by Agrobacteria was transformed into Brassica napus Huayou7 and Xiangyou15. PCR detection verified that the OsWRKY45 was integrated into the rapeseed genome and the transgenic plants were obtained. The transformation rates of the different explants from different varieties are different, and the percentage of kanamycin-resistant plants from Huayou7 is slightly higher than that from Xiangyou15, while that from the hypocotyls is twice as that from the callus. Moreover, the percentage of kanamycin-resistant plants from the hypocotyls of Huayou7 reaches up to 10.9%. Drought-resistant ability of transgenic plants is much higher than that of non-transgenic plants.