The study utilizes a dataset with seven critical constraints and creates models that are estimated based on various metrics. The goal is to categorize and properly predict the water quality index (WQI) using the suggested models. The outcomes show that the implied models can accurately assess water quality and forecast WQI with high rates of success. Temperature, pH, dissolved oxygen (DO), conductivity, total dissolved solids (TDS), turbidity, and chlorides (Cl-) are some of the six crucial factors used in the study’s dataset. The mean absolute error (MAE), mean squared error (MSE), and coefficient of determination (R2) are some of the metrics used to develop and assess the Artificial Neural Networks (ANN) and Long Short-Term Memory (LSTM) models. The study also makes use of heat maps and correlation graphs to shed further light on the connections between various water quality measures. The color-coded values of the seven parameters, which represent the water quality level of the sample, are displayed on the heat map. The link between the two parameters is shown by the correlation graph between TDS and turbidity, which depicts their correlation coefficient. The study’s results show how effective machine learning algorithms may be as a tool for observing surface water quality. Himachal Pradesh is the tourist hub, so with the rapid increase in the volume of surface water contamination, the application of artificial intelligence will give a better view of data analytics and help with prediction and modeling. It was obtained from the study that the mean square error and root mean square error of ANN and LSTM lie between 0.52–6.0 and 0.04–0.21, respectively. However, the LSTM model’s accuracy is 95%, which is higher than the ANN model. The study highlights the importance of leveraging machine learning techniques in water quality monitoring to ensure the protection and management of water resources. With advancements in machine learning, artificial intelligence (AI) techniques have emerged as a promising tool for surface water quality monitoring. The major goal of the study is to explore the potential of two types of machine learning algorithms, namely artificial neural networks (ANNs) and long short-term memory (LSTM) models, for surface water quality monitoring.