The short answer is yes.
I posted this question because I came across a scientific research exactly answering the question:
Toshimitsu Tokimoto, Naohito Kawasaki, Takeo Nakamura, Jyunichi Akutagawa, Seiki Tanada. "Removal of Lead Ions in Drinking Water by Coffee Grounds as Vegetable Biomass." Journal of Colloid and Interface Science 281.1 (2005): 56-61.
The rate of lead ion adsorption by coffee grounds was directly proportional to the amount of coffee grounds added to the solution. When coffee grounds were degreased or boiled, the number of lead ions decreased. When proteins contained in coffee grounds were denatured, the lead ion adsorption was considerably reduced. The lead ion adsorption capacity of coffee grounds decreased with increased concentration of perchloric acid used for treating them and disappeared with 10% perchloric acid. The experiments demonstrated that proteins contained in coffee beans depend upon the adsorption of lead ion. The present study gave an affirmative answer to the possibility of using coffee grounds, an abundant food waste, for removing lead ions from drinking water.