The invention relates to a method for producing a wind-power mainshaft by local continuous upsetting and all-fibre upset forging. The method comprises the following: step one, the heating of steel ingot; step two, forging; step three, first heat processing; step four, rough machining and ultrasonic inspection; step five, quenching and tempering and heat processing; step six, fine machining, wherein, during the step two, the forging comprises that: (1) a first fire, during which, a steel ingot is subject to upset forging at a forging temperature of between 1250 and 900 DEG C; firstly, the bottom of the steel ingot is sawed off, and the steel ingot is subject to capping and upset forging; (2) a second fire, during which, the steel ingot is stretched towards various directions, marked and subject to intermediate billet cogging; after a pole part is molded, scrap on a T end is chopped and removed; after the forging is finished, the steel ingot returns to a heating furnace for being reheated; (3) a third fire, during which, the steel ingot is subject to local continuous upsetting and all-fibre upset forging; (4) a fourth fire, during which, the steel ingot is subject to rolling and leveling; the pole part is stretched; the disc edge of a hub end on the head part of an intermediate billet material after the local continuous upsetting and all-fibre upset forging is subject to rollingoperation; after the rolling, the intermediate billet material is inserted into a leaking disc component again; the end face of the disc is pressed and leveled; after the shaping of the disc end is completed, a manipulator clamps the disc and stretches the pole part of the intermediate billet material to a dimension of a forgeable piece; thus, the mainshaft forging is completed. The method can improve the fatigue resisting strength of a wind-power mainshaft forging piece.