Electrochemiluminescence (ECL) sensors are useful for the detection of heavy metal pollutants, in particular mercury(ii) ions, in water samples. We demonstrate the superior sensing performance of Hg2+ using a nanocomposite material based on carbon nitride nanosheets (CNNSs) and copper nanoclusters functionalized by dithiothreitol, which not only stabilizes the clusters, but also improves the sensitivity of Hg2+ detection. The ECL mechanism is related to the reaction of the nanocomposite with K2S2O8 in the electrochemical system, while the presence of Hg2+ leads to quenching of its excited state, and the suppression of the formation of anion-radicals. The Hg(ii) sensor presented here is cheap and fast, and shows high selectivity for the detection of Hg2+ on the background of other mono-, di-, and trivalent ions, with a linear range of 0.5-10 nM and the detection limit as low as 0.01 nM.