A hub motor includes a housing rotatably disposed to a first shaft and a second shaft, and a motor installed in the housing and having a
stator and a rotor. A reduction mechanism is installed in the housing, including a gear shaft connected with the rotor, a fixed bracket connected with the
stator, a movable bracket disposed on the gear shaft and the second shaft, a first ring gear disposed to the fixed bracket, a second ring gear disposed to the housing, multiple first
planet gears disposed to the movable bracket and meshed with the gear shaft and the first ring gear, and multiple second
planet gears disposed to the second shaft and meshed with the movable bracket and the second ring gear. By 10 inserting a hollow tube into the first shaft, the gear shaft, the movable bracket, and the second shaft, the waterproof and dustproof performance can be enhanced.