An accurate state of charge (SOC) estimation depends on an accurate battery model. The influence of nonlinear and unstable interference factors makes the accurate SOC estimation difficult. To obtain an accurate battery model, a method based on the NARX (nonlinear autoregressive network with exogenous inputs) recurrent neural network and moving window method is proposed. This paper improves the accuracy, modelling speed and robustness of SOC estimation from the following three aspects. First, to overcome the excessive reliance on the amount of data in the model training process, the NARX recurrent neural network is used to establish the battery model. NARX (nonlinear autoregressive with external input) recurrent neural network with the delay and feedback functions can keep the input and output of a previous moment and add it to the calculation of the next moment. Therefore, better estimation results are achieved using a small amount of data; second, the moving window method is used against the gradient explosion and the gradient vanishing that may occur in the NARX model training process. Third, by comparing it with other methods under different working conditions and different temperatures, the validity of the proposed model is verified. The results indicate that the proposed model has a higher accuracy and speed of the SOC estimation. The RMSE performance of the proposed model is reduced by approximately 65%, and the execution time is shortened by approximately 50%.