Groundwater pollution is a serious problem, posing severe problems on many economic activities. The study's main objectives were to access the groundwater quality in the study area and analyze the role of farmers in improving the groundwater quality. Total 108 groundwater samples were collected from different locations along the 11-L distributary located in District Sahiwal, Punjab-Pakistan. Samples were tested to analyze the quality of groundwater for agriculture and livestock. The parameters included pH, Ec, and TDS, were tested. Results showed that 14 samples were found to be fit, 23 were marginally fit and 71 were declared unfit for agricultural consumption. The results of CCME water quality index were also in favour of lab reports. Most wheat-growing farmers were using gypsum as a remedial measure to minimize the side effects of poor groundwater quality. Few farmers were using farmyard manure to improve groundwater quality. There are many factors that influence the adoption of remedial measures to compensate for the poor groundwater. Farmers were facing a few limitations that compelled them to avoid incurring any further costs in order to improve groundwater quality. The financial constraint was the main issue. The endogenous switching regression model was used for data analysis. The findings revealed that family workers, experience, education, and soil quality positively impact remedial measures adoption. The study recommended that proper groundwater quality monitoring is required on a regular basis. Farmers should be educated regarding the proper use of gypsum. The sewerage system was absent in many villages of the study area. To avoid the further leaching of hazardous materials into groundwater, it is critical to construct an effective waste management system.