Urban groundwater influences a wide range of processes in the natural world, including climatic, geological, geomorphic, biogeochemical, ecotoxicological, hydrological, and sanitary processes, supporting several ecological services. Waste groundwater management refers to the activities and practices used to ensure groundwater resources' sustainable use and protection. This can include monitoring and evaluating groundwater resources' status and protecting groundwater from pollution and other forms of degradation. Many research works have been implemented in managing groundwater. There need to be more parametric measurements available with the current technology to monitor water quality. Groundwater management and monitoring water quality in the urban environment is an important task, as urbanization can lead to increased contamination of groundwater sources. One method for managing and monitoring groundwater quality is proposed using a least squares support vector machine (LS-SVM) with a particle optimization algorithm. The LS-SVM with PSO algorithm I s used in groundwater management as a method for monitoring and evaluating the quality of groundwater resources. The LS-SVM is a machine learning algorithm that uses the least squares approach to model complex data relationships. The PSO algorithm is a particle optimization algorithm that optimizes the parameters of the LS-SVM model. By combining these two techniques, the LS-SVM with PSO algorithm provides a more accurate prediction of groundwater quality compared to other algorithms such as KNN and SVM. The accuracy rate of various algorithms with groundwater pollution dataset with the algorithms of KNN 75.32%, SVM 81.78%, KCM 77.16%, and proposed work of LSSVM-PSO 92.73%.