 This paper proposed a new approach for predicting the remaining useful life of supercapacitors using the Harris-Hawk optimization algorithm, HHOA, and long short-term memory recurrent neural networks, LSTMRNNs. The HHOA was used to optimize the initial learning rate of the LSTMRNNs and the number of hidden layer units, resulting in improved stability and reliability of the system. The root mean square error, RMSC, between the predicted result and the observed result was reduced from 0.0207, 0.026, and 0.0341 with the HHOALSTMRNN model compared to traditional LSTM and GRU models. This shows that the HHOAALSTMRNN model has higher accuracy and robustness than other models. This article was authored by Ningma, Huishanin, and Kai Wang.