The invention provides a process for machining a gear main shaft of a high-power wind turbine generator set and relates to the adjustment of the sequence of heat treating and machining in the technological process. The specific process includes the steps of carrying out rough machining and semi-finishing machining on a blank, machining a gear and gear teeth, machining a spline, coating anti-seepage agents, carrying out heat treatment, and finally carrying out external grinding and tooth grinding. Accordingly, a part is machined. Meanwhile, in the machining process, imported high-end devices and tools are used in critical procedures and are cooperated with a heat treatment micro-distortion control technology so that specialized complete process machining from the blank to the finished product can be achieved. Through the process for machining the gear main shaft of the high-power wind turbine generator set, a fine metallographic structure and an even carburized layer can be obtained through the heat treatment. Consequently, the strength and accuracy of the spline are improved, the weight of the gear main shaft is reduced, and the service life of the gear main shaft is prolonged.