We recently discovered that a Ca2+ two-dimensional framework, namely [Ca(H4L)(DMA)2]·2DMA (Ca-MOF), was capable of exchanging the Ca2+ ions with Cu2+ almost quantitatively in a matter of seconds in aqueous solution. Herein, we report that Ca-MOF exhibits the capability of both removal and voltammetric determination of heavy metal ions in aqueous media. Ca-MOF shows one of the highest Pb2+ sorption capacities (∼522 mg g-1) reported for MOFs. More importantly, a column filled with Ca-MOF (1% wt) particles dispersed in silica sand (99% wt) can quantitatively remove traces of Pb2+ (∼100 ppb) from a relatively large volume of a wastewater simulant solution (containing a large excess of competitive ions). Ca-MOF is also highly efficient for sorption of Cd2+, Ni2+ and Zn2+, even in the presence of several competitive cations. Actually, the Cd2+ sorption capacity (∼220 mg g-1) of Ca-MOF is one of the largest reported for MOFs. Furthermore, detailed Ni2+ and Zn2+ sorption studies of MOFs have not been described prior to this work. The mechanism of the M2+ (M2+ = Pb2+, Cd2+, Ni2+, Zn2+) exchange process was elucidated based on a series of spectroscopic, analytical and X-ray diffraction methods. In addition, a simple ready-to-use electrochemical sensor based on modified graphite paste with Ca-MOF was fabricated and successfully utilized for the determination of Pb2+, Cd2+, Cu2+ and Zn2+ at μg L-1 levels in aqueous solutions by anodic stripping voltammetry (ASV). Overall, this work demonstrates, for the first time, a dual function of a MOF as a sorbent and as an electrochemical sensor for heavy metal ions, thus opening a new window for materials with application in both environmental remediation and monitoring.