ABSTRACTAccurately predict the remaining useful life (RUL) of lithium‐ion batteries for energy storage is of critical significance to ensure the safety and reliability of electric vehicles, which can offer efficient early warning signals in a timely manner. Considering nonlinear changes in the aging trajectory of lithium‐ion batteries, a method for predicting the RUL of lithium‐ion batteries was proposed in this study based on a complementary ensemble empirical mode decomposition (CEEMD) as well as transformer and long short‐term memory (LSTM) neural network dual‐drive machine learning model. First, the CEEMD algorithm was adopted to decompose the raw aging data of lithium‐ion batteries into intrinsic mode function (IMF) sequences and residual sequence, where the number of modal layers was produced by the proposed posterior feedback entropy and relevance (PFER) method. Second, prediction models of LSTM and transformer neural networks were established to predict IMF and residual sequences. Simultaneously, the sparrow search algorithm (SSA) was used to obtain the optimal value of the hyperparameter learning rate for the RUL prediction model. Finally, the predicted IMF and residual sequences were combined to comprehensively calculate the future lifespan aging trajectory of lithium‐ion batteries. The aging data of two groups of lithium‐ion batteries were obtained from the CALCE at the University of Maryland as well as the laboratory at AQNU University to verify the proposed method. Experimental results demonstrated that the proposed method can effectively predict the RUL of lithium‐ion batteries; moreover, it exhibited better robustness and generalization ability.