Lithium-ion batteries have the advantage of high energy density, low self-discharge rate, and long cycle life, and are currently the most widely used energy storage carriers. Accurate state of charge (SOC) estimation is essential to ensure the lithium-ion battery's safe and reliable operation. In order to improve the accuracy of estimation, this paper creatively applies the extended Kalman filter (EKF) to the improved nonlinear autoregressive algorithm with an exogenous neural network (NARXNN), forming a NARX-EKF neural network model for SOC prediction of the lithium-ion battery for the first time. This method avoids complicated equivalent modeling and parameter identification, rather directly maps the measured voltage, current, and temperature to the SOC. The data set is obtained by simulating the driving cycle load of the lithium-ion battery under different working conditions, and the network is tested under cyclic working conditions, dynamic working conditions, different temperature conditions, and different aging cycles. The SOC estimation results of the NARX-EKF model are evaluated from three aspects: mean absolute error (MAE), root mean square error (RMSE), and SOC error. Under cyclic conditions, the RMSE and MAE of NARXNN are only 1.4% and 1.3%, which is only 50% of other neural networks. In the dynamic working condition test, the maximum error of NARXNN optimized by EKF is reduced by about 50%, and the RMSE and MAE of the model are only 20% of other neural networks. When the ambient temperature changes, the RMSE and MAE of the model under low-temperature conditions were 1.2% and 0.9% respectively. The RMSE and MAE of the model under high-temperature conditions were 0.6% and 0.5% respectively. In addition, the NARX-EKF network can well solve the impact of different aging degrees of lithium-ion batteries on SOC estimation. When the battery health status is only 70%, the RMSE and MAE of the model were only 2.7% and 2.5% respectively. The results show that the NARX-EKF model has high accuracy, robustness, and good application prospects.