Endophytic fungi’s application in biological wastewater treatment is a cost, clean, and eco-friendly. This study aimed to assess the efficiency of three Aspergillus species in the mycoremediation of industrial (I) and agricultural (A) wastewater. These species were Aspergillus flavipes, Aspergillus niger, and Aspergillus flavus isolated from the bark of a medicinal plant (A0cacia saligna). Aspergillus species were subculture on potato dextrose broth at 28 °C for 7 days on a rotatory shaker at 180 rpm until fungal pellets were formed. Before and after treatment with fungi, all wastewater samples were examined for pH, TDS, salinity, EC, COD, BOD, TP, TN, and turbidity. According to the results, Aspergillus flavipes has a good removal efficiency of total phosphorus, removing 78% of it from sample (I) after 25 days, and turbidity removing 91% after 20 days in (A) sample. Aspergillus niger has a high chemical oxygen demand removal efficiency of 99% and 99.8% in (I and A) samples after the 15th and 10th day, respectively, in addition to total nitrogen removal efficiency of 99% in (A) sample after the 25th day; and turbidity removal efficiency of 99.7% in the same sample. Also, Aspergillus flavus recorded high removal of biological oxygen demand by 76% and 66% in (I and A) samples after the 10th day of each, respectively; total nitrogen by 69% after the 10th day in (I) sample; total phosphorus by 23% after 10th day in (A) sample; electrical conductivity by 10.7% after 10th day in (I) sample; and total dissolved salts by 1.3% after 5th day in (I) sample. The results explained that Aspergillus niger and Aspergillus flavus were the most efficient in the removal of chemical oxygen demand and biological oxygen demand which represented indicators of pollution in wastewater. The obtained results will be useful for optimal management of agricultural and industrial wastewater.