The thermal effect on machine tools has become a well-recognized problem in response to the increasing requirement of product quality. The performance of a thermal error compensation system basically depends on the accuracy and robustness of the thermal error model. This paper presents a thermal error model using two mathematic schemes: GM(1, N) model of the grey system theory and the adaptive network-based fuzzy inference system (ANFIS). First, the measured temperature and deformation results were analyzed via the GM(1, N) model to obtain the influence ranking of temperature ascent on thermal drift of spindle. Then, using the high-ranking temperature ascents as the input of ANFIS and training these data by hybrid learning rule, the thermal compensation model can be quickly built. The GM(1, N) model is used to effectively reduce the number of temperature sensors putting on the machine structure in prediction, and the ANFIS has the advantages of good accuracy and robustness. Eventually, tests of no-load and real-cutting operations were conducted and the comparison results show that the modeling schemes of ANFIS coupled with the GM(1, N) has good prediction ability