The invention provides a device and method for forming a gear through rotary swaging in the radial direction, and relates to a gear forming device and method to solve the problems that when axial overall loading is adopted for a traditional gear obtained through finish forging, forming accuracy is low, and required loads are large. According to the device, a plurality of arc-shaped grooves in a rotary swaging die 1 and a plurality of protrusions in the rotary swaging die 1 are alternately arranged, radial punch pins with springs arranged at the bottom in a sleeved mode are placed in stepped holes respectively, and the radial punch pins and components of a guide die are arranged in the rotary swaging die. The method includes the steps that firstly, a blank to be machined is arranged on a mandrel in a sleeved mode; secondly, the rotary swaging die rotates by 1 / 2N circles in the clockwise direction or the anti-clockwise direction; thirdly, in the rotating process, the protrusions exert pressure on an arc-shaped head, and the radial punch pins move gradually towards the axis of the mandrel along the stepped holes; fourthly, when the rotary swaging die rotates to the centers of the protrusions and coincides with the axes of the punch pins, the forming process is completed; fifthly, the rotary swaging die continues to rotate by 1 / 2N circles in the clockwise direction or the anti-clockwise direction, the radial punch pins retreat to the initial positions, and then the forged gear part can be taken out. The device and method are used for forming the gear.