The state of charge (SOC) of lithium-ion batteries (LIBs) is regarded as the fundamental parameter of the battery management system (BMS). In this paper, a parameter optimization method for mobile estimation windows based on particle swarm optimization-adaptive square root cubature Kalman filter (PSO-ASRCKF) is established to improve the SOC estimation ability and accuracy of LIBs. The filtering algorithm parameters are optimized to achieve high-precision SOC estimation. An improved ASRCKF with the PSO algorithm to optimize the moving estimation window is constructed to obtain the best adaptive window value. Different temperatures and initial SOC values are used to verify the proposed method under dynamic stress test (DST) and other conditions. The results show that the relative error is mainly distributed within 0.5 % when the SOC is stable. In addition, robustness and adaptability are verified with the root mean square error (RMSE) and the mean absolute error (MAE) values of 0.0019 and 0.0017, respectively, under the DST working condition. The experimental results show that the proposed method can achieve accurate SOC estimation under different temperatures, operating conditions, and initial SOC values.