The utilization of treated wastewater (TWW) for agricultural irrigation can enhance soil properties and fertility for better crop growth. However, toxic chemicals in TWW, if exceeding permissible limits, pose environmental and health risks. This study aims to evaluate the quality of treated wastewater (TWW) and groundwater used for irrigation in alfalfa and date palm fields, focusing on specific ion toxicity, salinity, heavy metal concentrations, and other water quality parameters. Water samples were collected from four plantation sites in the Ibra and Alqabil provinces during the summer and winter seasons of 2020 and 2021. The samples were analyzed for electrical conductivity (EC), pH, total dissolved solids (TDS), carbonate, bicarbonate, and the presence of arsenic (As), cadmium (Cd), cobalt (Co), boron (B), lead (Pb), nickel (Ni), copper (Cu), iron (Fe), zinc (Zn), manganese (Mn), and chromium (Cr). The findings reveal that both TWW and groundwater in the sampled sites exhibited salinity levels detrimental to sensitive crops. Trace element concentrations generally adhered to permissible limits as defined by FAO and Oman standards, except for boron, which exceeded allowable limits by up to 40% in groundwater when compared to the control site. Notably, cobalt (Co), arsenic (As), and cadmium (Cd) were undetectable in all water samples. Additionally, groundwater samples taken in close proximity to sewage treatment plants (STPs) displayed a 37% increase in EC, TDS, and heavy metal concentrations. This suggests that groundwater, like TWW, may contain undesirable salts and heavy metals that could compromise water quality. This research underscores the importance of monitoring and assessing the quality of both treated wastewater and groundwater used for irrigation. While these water sources hold potential benefits for agriculture, they also carry the risk of negatively impacting soil and crop health due to salinity and the presence of certain contaminants. This study provides critical insights into the safe use of TWW and groundwater in agricultural practices, highlighting areas for improvement in water treatment and management strategies to ensure sustainable agricultural productivity.