The sensitive and reliable detection of Hg 2+ and CN À as harsh environmental contaminants are of great importance. In view of this, a novel 'on-off-on' fluorescent probe based on nitrogen-rich silicon quantum dots (NR-SiQDs) has been designed for sensitive detection of Hg 2+ and CN À ions in aqueous medium. NR-SiQDs were synthesized using a facile, one-step, and environment friendly procedure in the presence of 3-aminopropyl trimethoxysilane (APTMS) and ascorbic acid (AA) as precursors, with L-asparagine as a nitrogen source for surface modification. The NR-SiQDs exhibited strong fluorescence emission at 450 nm with 42.34% quantum yield, satisfactory salt tolerance, and superior photostability and pH stability. The fluorescence emission was effectively quenched using Hg 2+ (turn-off) due to the formation of a nonfluorescent stable NR-SiQDs/Hg 2+ complex, whereas after the addition of cyanide ions (CN À ), Hg 2+ ions could be leached from the surface of the NR-SiQDs and the fluorescence emission intensity of the quenched NR-SiQDs fully recovered (turnon) due to the formation of highly stable [Hg(CN) 4 ] 2À species. After optimizing the response conditions, the obtained limits of detection were found to be 53 nM and 0.46 μM for Hg 2+ and CN À , respectively. Finally, the NR-SiQD-based fluorescence probe was utilized to detect Hg 2+ and CN À ions in water samples and satisfactory results were obtained, suggesting its potential application for environmental monitoring.