The invention discloses a gear transmission for a power output shaft for an electromagnetic keylock. The gear transmission consists of a main reducing gear, transmission gears, a speed regulation gear, an electromagnetic keylock output shaft, an electromagnetic speed regulation ring, a gear reversing device, and a gear shift device. All transmission gears on a transmission gear shaft are meshed with the corresponding change gears; and when the keylock is in a non-locked state, the change gear freely rotates relative to the power output shaft so as to show a neutral position state. When the speed is regulated, the gear is changed by pushing a gear shift handle, positive electricity is conducted to an electric conduction metal ring through a speed regulation ring carbon brush, an electromagnetic keylock coil electromagnetic jack coil is connected, magnetic attraction is performed, and the keylock is opened to select the change gear which locks a certain gear so as to realize the gear adjustment. During gear reversing, a gear reversing keylock is ejected from a keylock window, the power output shaft and a gear reversing gear are locked, and the power output shaft outputs reactive torque so as to realize the gear shift function. The invention has the advantages that: by the gear transmission, the gear is easy to shift, the gear has few components, the gear transmission is used reliably, and has light weight, and the like. The gear transmission can be widely applied to the field of carrying tools.