Complexation-induced supramolecular assembly drives metal-ion extraction.