Recently, carbon dots (CDs) have exhibited promising applications in the fluorescence detection of various ions and biomolecules. This work synthesized a new type of nitrogen-doped CDs (N-CDs), characterized by transmission electron microscopy (TEM), X-ray diffraction (XRD), X-ray photoelectron spectroscopy (XPS), Fourier-transform infrared (FT-IR), UV-vis absorption spectra, and fluorescence spectra. The results show that the spherical and uniform N-CDs (quantum yield: 60.2%) have remarkable fluorescence properties and photostability, which makes N-CDs can be utilized as an "on-off-on" sensor for Hg2+ and glutathione (GSH). In addition, the pH-sensitive behavior of N-CDs makes it also applicable to H+ detection under acid conditions (pKa = 3.53). The linear range of the "turn-off" sensor detecting Hg2+ was 0 - 50 μM, with a 0.014 μM limit of detection (LOD). GSH was detected by the fluorescence "turn-on" method with a linear range of 0 - 60 μM and a LOD of 0.125 μM. The outstanding performance of N-CDs makes it potential applications in ecological pollution and biomolecule visualization monitoring.