In this research, the concentrations of nitrates were investigated in well water sampled from the irrigated perimeter of Beni Moussa (Tadla plain, Morocco), and human health risks via ingestion and dermal pathways for individuals in different age brackets were assessed using the chronic daily intake, the dermal absorbed dose and hazard index (HI).The results showed that the groundwater NO3 contents were between 4.20 to 80.46 mg L− 1, with an average of 32.11 mg L− 1, indicating anthropogenic inputs caused by the infiltration of nitrates not consumed by plants or surface industrial and domestic wastewater into the shallow aquifer. Compared to the Moroccan standard, 17.78%, 40.00%, 37.78% and 4.44% of sampled wells showed poor, fair, good or excellent quality, respectively. For non-carcinogenic risk, the oral ingestion of nitrate appeared to be the main exposure pathway for local human receptors causing the high non-carcinogenic risk, and the dermal exposure met within the accepted precautionary criterion. Infants in the study area are more likely to experience adverse effects to higher nitrate level in groundwater (3.04E-01 < HI < 1.80E+ 00), followed by female (2.39E-01 < HI < 1.41E+ 00), then male (2.22E-01 < HI < 1.31E+ 00) and finally children (2.08E-01 < HI < 1.23E+ 00). The resulting spatial variation in HI values was greatly influenced by human activities and population density.The results of this study could help to shape effective environmental management measures for enhancing the groundwater quality and ensuring safe drinking water.