The invention discloses a method for thermal deformation error compensation of a digital control gear hobbing machine, which comprises the following steps of: 1, adopting temperature and displacement sensors to detect variable values of a temperature and a thermal deformation displacement on line when the digital control gear hobbing machine is in the course of working; 2, using a fuzzy clustering analytic method to calculate linearly dependent coefficients of variables of the temperature and the displacement, performing classification and optimization on the variable of the temperature, and determining the displacement variable Xi for model building and optimized p temperature independent variables T1, T2, T3, ..., and Tp; 3, adopting a multiple linear regression-least square method to establish a mathematic model of thermal errors and temperature variables; and 4, realizing online real-time compensation of thermal deformation errors of the digital control gear hobbing machine by using a zero programming system. The method solves thermal deformation error problems of a processing gear of the digital control gear hobbing machine, and by performing the online real-time error compensation on the digital control gear hobbing machine, the method improves the gear processing quality, the accuracy and the efficiency, reduces the rejection rate, saves the cost and shortens the processing cycle.