Estimating the remaining useful life (RUL) of lithium-ion batteries presents a critical challenge, as it necessitates predicting their future performance and lifespan under diverse operational conditions. Addressing this issue is crucial for enhancing battery maintenance, improving reliability, and safeguarding devices that depend on lithium-ion technology. In this article, we propose a dual-method approach for RUL estimation. Firstly, an autoencoder (AE) extracts pivotal features from the input. Key measurable parameters, such as voltage, current, and temperature from charging profiles, are derived from the battery management system, providing robust data for the AE. The core of the AE is constructed using a spatial attention-based transductive long short-term memory (TLSTM) model, which is trained with an advanced generative adversarial network (GAN). The TLSTM model employs transductive learning, emphasizing samples near the test point to refine the fitting process and surpassing conventional LSTM models in performance. Following the AE training phase, the input's latent representation is inputted into a multilayer perceptron (MLP) designed for RUL prediction. We conduct thorough evaluations using National Aeronautics and Space Administration (NASA) datasets. Additionally, experiments from the Center for Advanced Life Cycle Engineering (CALCE) at the University of Maryland are underway to examine the influence of transfer learning (TL) on our model. The TLSTM model performs better than other deep learning models, achieving an impressive mean absolute percentage error (MAPE) ranging between 0.0053 and 0.0095. This highlights the efficacy and superiority of our approach in accurately predicting RUL, offering significant potential benefits for industries reliant on energy storage systems.