The operation life of energy storage power stations in China is generally increasing, which leads to frequent safety accidents. How to detect the abnormal state of energy storage battery more accurately has gradually become a hot issue in the industry. This paper presents a residual early warning method based on extended Kalman filter. Firstly, the state of charge (SOC) estimation model of lithium iron phosphate battery based on extended Kalman filter is established; Then, the nonlinear function between SOC and battery parameters is fitted according to the real data, and the estimated battery voltage is obtained; Finally, nonlinear state estimation technology is used to detect the residual between the estimated value and the real value. The 54000 second data of LiFePO4 battery is used to verify the method, and the results show that the method can detect the occurrence of battery failure better.