Soil and wastewater samples contaminated by petroleum-related industries were collected from various locations in Saudi Arabia, a country known for its vast oil reserves. The samples were analyzed for their physicochemical properties, including the presence of metals, petroleum hydrocarbons, and aromatic compounds. A total of 264 fungal isolates were analyzed and categorized into eight groups of Aspergillus (194 isolates) and four groups of Penicillium (70 isolates). The potential of these fungal groups to grow in oil or its derivatives was investigated. Two isolates, Aspergillus tubingensis FA-KSU5 and A. niger FU-KSU69, were utilized in two remediation experiments-one targeting wastewater and the other focusing on polluted soil. The FA-KSU5 strain demonstrated complete removal of Fe3+, As3+, Cr6+, Zn2+, Mn2+, Cu2+ and Cd2+, with bioremediation efficiency for petroleum hydrocarbons in the wastewater from these sites ranging between 90.80 and 98.58%. Additionally, the FU-KSU69 strain achieved up to 100% reduction of Co2+, Ba2+, B3+, V+, Ni2+, Pb2+ and Hg2+, with removal efficiency ranging from 93.17 to 96.02% for aromatic hydrocarbons after 180min of wastewater treatment. After 21days of soil incubation with Aspergillus tubingensis FA-KSU5, there was a 93.15% to 98.48% reduction in total petroleum hydrocarbons (TPHs) and an 88.11% to 97.31% decrease in polycyclic aromatic hydrocarbons (PAHs). This strain exhibited the highest removal rates for Cd2+ and As3+ followed by Fe3+, Zn2+, Cr6+, Se4+ and Cu2+. Aspergillus niger FU-KSU69 achieved a 90.37% to 94.90% reduction in TPHs and a 95.13% to 98.15% decrease in PAHs, with significant removal of Ni2+, Pb2+ and Hg2+, followed by Co2+, V+, Ba2+ and B3+. The enzymatic activity in the treated soils increased by 1.54- to 3.57-fold compared to the polluted soil. Although the mixture of wastewater and polluted soil exhibited high cytotoxicity against normal human cell lines, following mycoremediation, all treated soils and effluents with the dead fungal biomass showed no toxicity against normal human cell lines at concentrations up to 500 µL/mL, with IC50 values ≥ 1000 µL/mL. SEM and IR analysis revealed morphological and biochemical alterations in the biomass of A. tubingensis FA-KSU5 and A. niger FA-KSU69 when exposed to petroleum effluents. This study successfully introduces non-toxigenic and environmentally friendly fungal strains play a crucial role in the bioremediation of contaminated environments. Both strains serve as low-cost and effective adsorbents for bio-remediating petroleum wastewater and oil-contaminated soil. Heavy metals and hydrocarbons, the primary pollutants, were either completely removed or reduced to permissible levels according to international guidelines using the dead biomass of FA-KSU5 and FA-KSU69 fungi. Consequently, the environments associated with this globally significant industry are rendered biologically safe, particularly for humans, as evidenced by the absence of cytotoxicity in samples treated with A. tubingensis FA-KSU5 and A. niger FA-KSU69 on various human cell types.