Machining dynamics plays an essential role in machine tools (MTs) and machining operations, directly impacting the material removal rate, surface quality, and dimensional accuracy. With the increasing use of numerical control (NC) MTs and increasing automation of production, machining inaccuracy due to thermal deformation has become a significant issue. Furthermore, since the rotation speed and feed rate have risen, more heat is produced in MTs. In addition, since high machining precision is now required, techniques to avoid or regulate thermal deformation are also needed. Traditionally, researchers used the finite element method, support vector method (SVM), regression analysis method, neural network, and other methods to predict and compensate for the thermal deformation of MT spindles. However, these methods do not directly reduce the thermal errors caused by the heat source to improve the accuracy of MTs. Therefore, in this study, a cooling control method is proposed to reduce the impact of heat on the spindle by using a thermal suppression technique accompanied by the adaptive neurofuzzy inference system (ANFIS) control method to predict the static thermal behavior of a spindle. The root mean square error (RMSE) is used as the ANFIS evaluation index to reflect the quality of the prediction model. This method is implemented in Simulink to simulate the dynamics of the coolant during the real-time monitoring of the cutting and resting positions of the MT. Finally, a thermal deformation prediction model is generated to demonstrate that the cooling control method developed in this study can be applied to the intelligent cooling of an MT. It is shown that the developed ANFIS prediction model is efficient for controlling cooling. A simulation also shows that this method can reduce the running cost, energy consumption and accurately predict the thermal deformation of MT spindles. It is predicted that the most suitable coolant pump operating frequencies for the spindle at rotation speeds