SummaryState of charge and state of energy are essential performance indicators of the battery management system and the key to reflecting the remaining capacity of batteries. Aiming at the problems of low precision, long time, and strongly nonlinear system estimation of state of charge and state of energy of lithium‐ion batteries based on traditional algorithm under complex working conditions, this paper proposes a hybrid method consisting of the long short‐term memory neural network and square root extended Kalman smoothing. The long short‐term memory neural network can enhance the memory ability of the previous time data. The sliding window technology is introduced into the network to improve the correlation between the last time and the subsequent time estimation. Based on the traditional Kalman filtering algorithm, the square root and reverse smoothing algorithms are introduced to solve the risk of the negative covariance matrix and the problems of slow convergence and significant estimation deviation caused by a strongly nonlinear system. According to experiments, under the hybrid pulse power characterization working condition at 25°C, the maximum absolute errors of state of charge and state of energy are 1.779% and 1.487%, and the mean absolute errors are 0.352% and 0.894%, respectively. Under the Beijing bus dynamic stress test working condition at 25°C, the maximum absolute errors of state of charge and state of energy are 2.703% and 2.369%, and the mean absolute errors are 0.462% and 0.621%, respectively. The experimental results show that this algorithm can obtain reliable state of charge and state of energy under different complex working conditions with high accuracy, convergence, and robustness.