As the fundamental component of a motor, bearings primarily serve the roles of supporting the guide shaft and minimizing equipment friction. Presently, deep learning models exhibit automatic feature acquisition capabilities and deliver commendable results in predicting the remaining useful life (RUL) of motor bearings. However, these deep learning models tend to overlook the slow-changing dynamics of low-frequency information embedded within mechanical dynamic behavior. To address the aforementioned challenges, we propose a novel approach: an RUL prediction model that incorporates a slow feature analysis-assisted attention mechanism with dual long short-term memory (dual-LSTM) networks. First, slow-changing features are decomposed on the basis of the automatic features extracted by the autoencoding model, enhancing the ability to capture the overall trend of changes in the full-life cycle of the rolling bearing. Second, slow features and features extracted via autoencoder are amalgamated to construct a multi-dimensional feature matrix. This matrix is subsequently inputted into a multi-head attention mechanism and dual-LSTM network model, dynamically selecting features with higher relevance, thereby enhancing the accuracy of RUL prediction. Additionally, the maximum mean discrepancy loss is incorporated into the loss function to mitigate the distribution differences between the training and test datasets. The effectiveness and superiority of the algorithm are validated using the IEEE 2012 PHM challenge and ALT-1A datasets. The results indicate that the proposed approach outperforms existing methods, providing a novel solution for RUL prediction.