When the total nitrogen content in water sources exceeds the standard, it can promote the rapid proliferation of algae and other plankton, leading to eutrophication of the water body and also causing damage to the ecological environment of the water source area. Therefore, making timely and accurate predictions of water quality at the source is of vital importance. Since water quality data exhibit non-stationary characteristics, predicting them is quite challenging. This study proposes a novel hybrid deep learning model based on modal decomposition, ERSCB (EMD-RBMO-SVMD-CNN-BiGRU), to enhance the accuracy of water quality forecasting. The model first employs Empirical Mode Decomposition (EMD) technology to decompose the original water quality data. Subsequently, it quantifies the complexity of the subsequences obtained from EMD using Sample Entropy (SE) and further decomposes the most complex subsequences using Sequential Variational Mode Decomposition (SVMD). To address the matter of selecting balanced parameters in SVMD, this study introduces the Red-Billed Blue Magpie Optimization (RBMO) algorithm to optimize the hyperparameters of SVMD. On this basis, a forecasting model is constructed by integrating Convolutional Neural Networks (CNN) and Bidirectional Gated Recurrent Unit (BiGRU) networks. The experimental results show that, compared to existing water quality prediction models, the ERSCB model has an improved prediction accuracy of 4.0% and 3.1% for the KaShi River and GongNaiSi River areas, respectively.