The invention discloses a motor with a cooling structure, which comprises a rotor, a stator, a casing and two end covers respectively arranged at two ends of the casing. The structure further comprises a cooling channel arranged in the side wall of the casing, and the casing is provided with a medium inlet and a medium outlet which are respectively communicated with the cooling channel; an axial fan is fixedly connected with the rotor, wherein the rotor is provided with an axial air duct, and the two end covers are respectively provided with a ventilation opening. According to the motor, a stator cooling structure is formed through the cooling channel to realize stator cooling; a rotor cooling structure is formed through the cooperation of the axial flow fan, the axial channel and the ventilation opening, and therfore the cooling of the rotor is realized; in other words, the overall cooling of the motor is realized through the combination of the stator cooling structure and the rotor cooling structure. Compared with the prior art, the motor disclosed in the invention is advantageous in that the stator cooling structure is added, and the rotor cooling structure is improved, so thatthe overall cooling effect of the motor is good, and the cooling efficiency is high.