Recently, carbon dots (CDs) have exhibited promising applications in the fluorescence detection of various ions and biomolecules. In this work, one kind of nitrogen-doped CDs (N-CDs) with high fluorescence intensity was synthesized, characterized by transmission electron microscopy, x-ray diffraction, x-ray photoelectron spectroscopy, Fourier-transform infrared, 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.014–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.125–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.