We report that the luminescence of upconverting luminescent nanoparticles (UCLNPs) is quenched by heavy metal ions and halide ions in aqueous solution. The UCLNPs consist of hexagonal NaYF(4) nanocrystals doped with trivalent rare earth ions and were synthesized by both the oleic acid (solvothermal) method and the ethylenediaminetetraacetic acid (co-precipitation) method. Quenching was studied for the Cu(II), Hg(II), Pb(II), Cd(II), Co(II), Ag(I), Fe(III), Zn(II), bromide, and iodide ions and is found to be particularly strong for Hg(II). Stern-Volmer plots are virtually linear up to quencher concentrations of 10-25 mM, but deviate from linearity at higher quencher concentrations, because static quenching causes an additional effect. The UCLNPs display two main emission bands (blue, green, red or near-infrared), and the quenching efficiencies for these are found to be different. The effect seems to be generally associated with UCLNPs because it was observed for all UCLNPs doped with trivalent lanthanide ions including Yb(III), Er(III), Ho(III), and Tm(III). The results are discussed in terms of quenching mechanisms and with respect to potential applications such as optical sensing.