This study investigated the release of metals and nutrients from municipal and industrial sludge using plant-derived biosurfactant (saponin) and microbial-derived biosurfactant (rhamnolipid). It also investigated the recovery of nutrients released from municipal sludge by a biosurfactant in the form of struvite. Compared to saponin, metals and nutrients release levels from municipal and industrial sludge were higher for rhamnolipid. The removal efficiencies of Ni, Cr, Fe and Zn from industrial sludge at a 5/1 liquid/solid ratio with 7% rhamnolipid concentration were 55.37%, 15.52%, 9.70%, and 4.20%, respectively. Compared to industrial sludge, less metal was released from municipal sludge with rhamnolipid, whereas the nutrients release was higher. Therefore, hydrolyzed municipal sludge liquid with rhamnolipid was used to the formation of struvite. Optimal conditions for the release of nutrients and metals from municipal sludge were obtained at a liquid/solid ratio of 5/1 and a 10% concentration of rhamnolipid. At these optimal conditions, the concentration of PO43- and NH4+ released was 1,564 and 1,419 mg/L, respectively. Under these conditions, the struvite produced from hydrolyzed municipal sludge liquid contained 2.24% N, 10.82% Mg, 11.03% P, 5.37% K and 4.11% Na by percentage weight calculated from the results of energy dispersive X-ray spectrometry. The heavy metal contents of the struvite obtained, Pb, Cu, Ni, Cr, Cd, and Hg, were below detection limits. The Zn content of the struvite was only 0.21 mg/kg.