Actually, the accumulation of heavy metals by crops irrigated by wastewater has considered a serious environmental problem in many countries such as Morocco, where the wastewater irrigation has become a widespread practice. In this study, we were interested in highly toxic metals such as zinc (Zn), copper (Cu), lead (Pb) and cadmium (Cd) in water, agricultural soils and crops and their possible risk on human health in the region of Marrakech. The physicochemical parameters pH, electrical conductivity, organic carbon and organic matter, were determined for the samples. Irrigated water, soil and vegetable samples for Zn, Cu, Pb and Cd concentrations and transfer factor from soils to plants (TF) were analyzed, daily intake of metals (DIM) and health risk index (HRI) were calculated. The irrigated soil was contaminated with Zn (112.71 mg/kg), Cu (17.70 mg/kg), Pb (57.36 mg/kg) and Cd (11.22 mg/kg). The trend of heavy-metal concentrations in all samples was Zn > Pb > Cu > Cd. The daily intake (DIM) for Cd and Pb exceeded the permissible limits. The Health Risk Index (HRI) varied from 0.054–0.174 for Zn, 0.031–0.242 for Cu, 2.407–7.973 for Pb and 0–5.059 for Cd. The HRI was >1 for Cd and Pb indicating a potential health risk. Our results revealed high risks indexes, heavy metal contaminated food crops in our study area, and consequently, a great health risk to the local human and animal populations. Thus, preventive measures must be taken to reduce heavy metal pollution of irrigation water and soils to protect both, human and animal health in Marrakech and Morocco.