Dams significantly impact river hydrology by changing the timing, size, and frequency of low and high flows, resulting in a hydrologic regime that differs significantly from the natural flow regime before the impoundment. For precise planning and judicious use of available water resources for agricultural operations and aquatic habitats, it is critical to assess the dam water’s temperature accurately. The building of dams, particularly several dams in rivers, can significantly impact downstream water. In this study, we predict the daily water temperature of the Yangtze River at Cuntan. Thus, this work reveals the potential of machine learning models, namely, M5 Pruned (M5P), Random Forest (RF), Random Subspace (RSS), and Reduced Error Pruning Tree (REPTree). The best and effective input variables combinations were determined based on the correlation coefficient. The outputs of the various machine learning algorithm models were compared with recorded daily water temperature data using goodness-of-fit criteria and graphical analysis to arrive at a final comparison. Based on a number of criteria, numerical comparison between the models revealed that M5P model performed superior (
R
2
= 0.9920, 0.9708; PCC = 0.9960, 0.9853; MAE = 0.2387, 0.4285; RMSE = 0.3449, 0.4285; RAE = 6.2573, 11.5439; RRSE = 8.0288, 13.8282) in pre-impact and post-impact spam, respectively. These findings suggest that a huge wave of dam construction in the previous century altered the hydrologic regimes of large and minor rivers. This study will be helpful for the ecologists and river experts in planning new reservoirs to maintain the flows and minimize the water temperature concerning spillway operation. Finally, our findings revealed that these algorithms could reliably estimate water temperature using a day lag time input in water level. They are cost-effective techniques for forecasting purposes.