Groundwater pollution from subsurface leaching of eroded soil, pesticides and fertilizers under agricultural fields are deteriorating the quality of groundwater. In this connection, this study aimed to prepare a groundwater vulnerability map using the DRASTIC (Depth to water table, net Recharge, Aquifer media, Soil media, Topography, Impact of vadose zone media and hydraulic Conductivity) model to evaluate the soil erosion and groundwater quality relationship under soil erosion prone areas of the Panjkora river basin in the northern Pakistan. In this model, relative weights between 1 and 5 are assigned (5 being the most important) to D-R-A-S-T-I-C variables that may affect groundwater quality. According to the results, 72161.64 Hectares (ha) of the study area is low vulnerable to contamination, 144828.70 ha area is slightly moderate vulnerable, 239582.22 ha area is moderate vulnerable, 121769.37 ha area is high vulnerable, and 944.61 ha area is very high vulnerable to groundwater contamination. Groundwater samples from soil erosion hotspots were examined to establish a correlation between soil erosion and groundwater contamination. Total dissolved solids (TDS) and NO2 concentration in some areas were found to be higher than the World Health Organization (WHO) permissible limits. Soil erosion exhibited a positive correlation with groundwater contamination with correlation coefficient (r) of 0.89, root mean square difference (RMSD) of 2.24 and bias of 0.094. The DRASTIC model was validated through ROC AUC curve (score = 0.62). This study is a first attempt to evaluate the inherent groundwater vulnerability and sensitivity to pollution in this region with severely declining groundwater quality due to several unexplored reasons.