Chloride converts lead slag into a bifunctional material to remove heavy metals.