Thermal errors and force-induced errors are two most significant sources of the NC grinding machine inaccuracy. And error compensation technique is an effective way to improve the manufacturing accuracy of the NC machine tools. Effective compensation relies on an accurate error model that can predict the errors exactly during machining. In this paper, a PSO–BP neural network modeling technique has been developed to build the model of the dynamic and highly nonlinear thermal errors and grinding force induced errors. The PSO–BP neural network modeling technique not only enhances the prediction accuracy of the model but also reduces the training time of the neural networks. The radial error of a grinding machine has been reduced from 27 to 8μmafter compensating its thermal error and force-induced error in this paper.