The core-shell NaGdF4:Yb,Er@NaGdF4:Yb,Nd upconversion nanoparticles (UCNPs) were successfully obtained with the method of co-precipitation, and the water-solubility of UCNPs was improved by the ligand exchange reaction between nitrosyl tetrafluoroborate (NOBF4) and nanoparticles. The IR-783 dye with negative charge and NOBF4-UCNPs with positive charge can bind together by electrostatic action to sensitize UCNPs through the energy transfer from IR-783 to UCNPs. However, with the presence of Na2S (a commonly used H2S donor), a highly selective reaction between H2S and IR-783, which destoried the structure of IR-783 and blocked the energy transfer, thus led to the quenching of luminescent intensity. Based on this, a sensing system for determination of H2S has been constructed successfully. The linear range of H2S detection by this system is 0.5-15 μM, and the detection limit is 34.17 nM. Furthermore, the dye-sensitized core-shell NaGdF4:Yb,Er@NaGdF4:Yb,Nd upconversion nanoprobe was applied to real sample analysis with satisfactory results.