Land degradation due to decline in soil quality and wastewater pollution is a major challenge for ecosystems sustainability, worldwide. Hence, utilizing adaptable and multi-objective strategies is essential to address environmental challenges. To this end, we produced a biochar from air-dried dairy wastewater sludge (i.e., Kalleh Dairy Company, Iran) through pyrolysis process at 300-350 degrees C which led to reduction in initial heavy metals contents. The produced biochar was then used to improve the soil quality of a highly degradable soil. Some important nutrients and heavy metals of dairy wastewater and produced biochar were measured by acid digestion/ICP-MS. We then spread two rates of the biochar (400 and 800 g m(-2)) over the surface of the small-scale boxes (0.5 x 0.5 x 0.5-m) filled by an erosion-prone soil collected from the Chalus Watershed, Northern Iran, and left for 30 days. The carbon (C), nitrogen (N) and organic matter (OM) content, and also carbon/nitrogen (C/N) ratio of treated soil were measured to assess effect of the produced biochar on soil quality improvement. The results showed that some contents of the measured heavy metals (i.e., Pb, Ni, Al, Cr, Mn, Fe and Zn) in the produced biochar significantly (p < 0.01) reduced compared to those of the raw dairy wastewater. Additionally, application of two dosages of 400 and 800 g m(-2) of biochar to the study soil increased C, N, OM and C/N of the soil at tunes of 2.67-5.5; 2-3 and 2.67-5.5 times, and 22-61%, respectively, in comparison with untreated soils (control). By and large, converting the wastewater as an environmental pollution source to biochar and using it as an eco-friendly soil amendment is a multi-objective and adaptive approach for the ecosystem management.