The objective of this study was to determine the concentration of heavy metals in the soil and horticultural crops grown under irrigation in the Mojo and Koka sites in Oromia, Ethiopia, and to evaluate the potential health risks that these metals may cause to consumers. For this investigation, a total of 50 onion (Allium porrum L.) and 50 soil samples were gathered. The content of heavy metals was measured using Inductively Coupled Plasma Optical Emission Spectroscopy (ICP-OES) after the samples' digest using microwave-assisted digestion. The mean concentrations of examined trace elements in onion (mg/kg) were found in the range of 0.80 to 0.95, for As 1.77 to 0.91 for Sn, 2.09 to 1.49 for Pb, 12.29 to 7.31 for B, 13.85 to 12.33 for Zn, 0.34 to 0.25 for Cd, 1.83 to 1.78 for Hg, 11.29 to 7.54 for Cu, 0.83 to 0.78 for Ni, 0.34 to 0.31 for Co, 78.39 to 42.19 for Fe, 17.03 to 11.56 for Mn, and 1.03to 1.02 for Cr. Given that the average levels of Pb, Hg, Cd, and As in onions at both irrigation sites surpassed the upper limit of allowable levels established by the joint FAO/WHO commission. These metals' concentrations in soil are found to be within acceptable bounds. As compared to other literatures, their concentration really exceeded in both irrigation sites. According to the metal pollution load index, the overall pollution load of trace metals, including As, Pb, Cd, and Hg, was found to be moderately higher in both irrigation locations for the majority of the onions under study. The results, which were computed using an adult consumer's food intake, indicated that the Pb and Hg dietary exposure levels were much higher than the daily intake amounts that were considered tentatively tolerated. The soil-to-onion transfer factor showed that whereas Fe has a strong sorption to the soil colloids, metal Cu is comparatively poorly maintained in the soil. The degree of metal enrichment in soils and sediments is higher than in other literatures, according to the soil pollution indices. Thus, swift action is needed to stop the issue and guarantee public safety along the food system's supply chain.