The realization of data-driven prediction regarding river water quality is of great significance for the maintenance of river ecosystems' health and also provides a scientific basis for the rational development, utilization, and protection of water resources. In order to verify the feasibility and superiority of the water quality prediction model based on whale optimization algorithm (WOA)-radial basis function neural network (RBFNN) for river water quality prediction, the water quality of the Xiangyang section of the Hanjiang River Basin was selected as the object of investigation. Drawing upon monitoring data collected from the Yujiahu cross-section between April 2023 and June 2023, a water quality prediction model based on WOA-RBFNN was devised. This entailed the utilization of the WOA to optimize the parameter values of the RBFNN, subsequently forecasting dissolved oxygen levels by inputting data pertaining to a total of nine influencing factors, encompassing air temperature, precipitation, relative humidity, water temperature, pH, ammonia nitrogen, total nitrogen, total phosphorus, and permanganate index, into the WOA-RBFNN-based water quality prediction model. The results revealed that the WOA-RBFNN-based water quality prediction model exhibited minimal deviation between the predicted and measured dissolved oxygen values. Comparative analysis with the dissolved oxygen prediction results of the RBFNN model and the back-propagation neural network (BPNN) model underscored the WOA-RBFNN-based water quality prediction model's superior convergence rate, minimized prediction errors, and heightened accuracy. Hence, it is affirmed that the water quality prediction model based on WOA-RBFNN can effectively predict the water quality in the Xiangyang section of the Hanjiang River basin.