The thermal error of the ball screw feed system will reduce the positioning accuracy of the machine tool, and the main reason for the thermal error is the friction heat generated by bearings and screw nut in the feed system. Therefore, a time-varying thermal error prediction method of the ball screw feed system based on the inverse method is proposed in this paper. Based on data-driven and dynamic thermal network model, the heat source estimation method of ball screw feed system under unsteady thermal effect is established, and the thermodynamic equilibrium equation is deduced into explicit form for heat source load identification. Aiming at the common matrix ill-conditioned problem of load identification, the regularization algorithm is used to identify the heat source load, and the optimal selection method of regularization parameters is proposed based on Monte Carlo algorithm. Using the collected temperature experiment data and the position data of the moving nut, the dynamic heat source load, temperature field and thermal error of the feed system under the actual working condition are predicted and analyzed by using the inverse method. Finally, the accuracy and effectiveness of the prediction method are verified by experiment. The inverse method proposed in this paper has great application potential for the prediction and estimation of heat source and temperature field of machine tools and various mechanical structures.