Remediation of metal-contaminated soils by aqueous washing is actually done using synthetic surfactants, calling for safer alternatives such as biosurfactants. Here we tested coffee-based humic substances extracted from various composts for soil washing of agricultural, industrial and urban soils contaminated by heavy metals. Molecular-level characterization of humic substances was done by 13C-nuclear magnetic resonance and thermochemolysis gas chromatography-mass spectrometry. Following washing, we measured heavy metals displacement into humic substance suprastructures by inductively coupled plasma mass spectrometry. Humic substance molecular changes were observed by ultrahigh resolution Orbitrap mass spectrometry. Soil toxicity was studied using the Microtox® Aliivibrio fischeri bioluminescence system. Results show that metal removal reached 90% for antimony, 15% for copper, and 13% for zinc. Moreover, toxicity was reduced by up to 62% for industrial soils, 50% for urban soils, and 46% for agricultural soils. The metal removal could be explained by chelation with humic pentacyclic terpenes.