This study examines the effects of three irrigation regimes with a combination of saline water and treated wastewater on the accumulation of heavy metals in barley grains. A field experiment was designed as a split‐split plot arrangement in a randomized complete block design, in which treatments were different irrigation regimes (50, 70 and 100% full irrigation) and irrigation water types (saline water (SW), treated wastewater (TW), mixed water resources (MWR) and alternative irrigation (AI)). After cultivation and harvesting of the barley crop, the grain yield, 1000‐grain weight and contents of heavy metals in the grains were measured. The grain yield was enhanced by TW alone, MWR and AI to 12.8, 5 and 9.5% under 70%‐deficit irrigation, and 58.3, 21.7 and 8.7% under full irrigation, respectively. Based on the guidelines for safe limits of heavy metals in edible plants and livestock feed, the barley grains were safe for livestock and toxic for humans. The trend of heavy metal contents in the grains was Fe>Zn>Pb>Cu≥Cr>Cd. Irrigation with saline water compared to treated wastewater increased Fe, Cu, Zn, Pb, Cd and Cr contents in the grains to 11.75, 10.97, 5.22, 19.15, 3.45 and 9.21%, respectively. The amounts of toxic elements of Cd and Pb were maximized by using MWR, while the Cr content in the grain was maximized by using AI. There were no significant difference in the metal uptake by the grains among all irrigation regimes in any irrigation water resource. However, compared to the other irrigation regimes, the full irrigation resulted in lower Zn, Cu and Cd contents, while the 50%‐deficit irrigation led to lower Pb and Cr contents in the grains. Therefore, irrigation with TW is recommended based on the grain yield, while AI is suggested due to lower Cu, Pb and Cd contents in the grain, and MWR is recommended due to lower Cr content. Furthermore, full and 50%‐deficit irrigation regimes are recommended to respectively maximize grain yield and minimize the toxic metal contents in the grain.