The present work demonstrates the effective application of pretreatment based on cavitation to improve biological oxidation of real municipal and industrial wastewater. The optimum pretreatment conditions based on ultrasonic cavitation for treatment of municipal wastewater were observed as power dissipation of 90 W, a duty cycle of 70% and H2O2 dosage of 0.2 g/L resulting in about 24.9% COD reduction. The use of modified sludge and ultrasonic pretreatment for biological oxidation resulted in significant reduction in treatment time (36 h) than the treatment time (60 h) required for biological oxidation using untreated sludge as inoculum. Also, significantly enhanced biodegradability index (BI) from 0.33 to 0.6 was achieved using pretreatment for biological oxidation process. For the treatment of real industrial wastewater, different pretreatment approaches based on hydrodynamic cavitation (HC) in combination with H2O2, ozone or Fenton were investigated. The pretreatment using best approach of HC + Fenton resulted in 44.2% of COD reduction in total whereas only 28.1% of COD reduction was achieved for the untreated effluent being applied in the biological oxidation. Overall, the present work demonstrated the effectiveness of the pretreatment based on cavitation for the improved treatment of municipal and industrial wastewaters.