Food safety has become a serious global concern because of the accumulation of potentially toxic metals (PTMs) in crops cultivated on contaminated agricultural soils. Amongst these toxic elements, arsenic (As), cadmium (Cd), chromium (Cr), and lead (Pb) receive worldwide attention because of their ability to cause deleterious health effects. Thus, an assessment of these toxic metals in the soils, irrigation waters, and the most widely consumed vegetables in Nigeria; Spinach (Amaranthushybridus), and Cabbage (Brassica oleracea) was evaluated using inductively coupled plasma-optical emission spectroscopy (ICP-OES). The mean concentration (measured in mg kg−1) of the PTMs in the soils was in the sequence Cr (81.77) > Pb(19.91) > As(13.23) > Cd(3.25), exceeding the WHO recommended values in all cases. This contamination was corroborated by the pollution evaluation indices. The concentrations (measured in mg l−1) of the PTMs in the irrigation water followed a similar pattern i.e. Cr(1.87) > Pb(1.65) > As(0.85) > Cd(0.20). All the PTMs being studied, were found in the vegetables with Cr (5.37 and 5.88) having the highest concentration, followed by Pb (3.57 and 4.33), and As (1.09 and 1.67), while Cd (0.48 and 1.04) had the lowest concentration (all measured in mg kg−1) for cabbage and spinach, respectively. The concentration of the toxic metals was higher in spinach than in cabbage, which may be due to the redistribution of the greater proportion of the metals above the ground tissue, caused by the bioavailability of metals in the aqueous phase. Expectedly, the hazard index (HI),and carcinogenic risk values of spinach were higher than that of cabbage. This implies that spinach poses potentially higher health risks. Similarly, the Monte Carlo simulation results reveal that the 5th percentile, 95th percentile, and 50th percentile of the cumulative probability of cancer risks due to the consumption of these vegetables exceeds the acceptable range of 1.00E−6 and 1.00E−4. Thus, the probable risk of a cancerous effect is high, and necessary remedial actions are recommended.