Nitrogen and chlorine co-doped fluorescent carbon nanodots (CDs) were prepared using a facile and eco-friendly solvothermal process in which N-Chlorosuccinimide(NCS) was used as a carbon source. The resulting CDs were characterized by UV-visible absorption spectroscopy, fluorescence spectroscopy, high-resolution transmission electron microscopy (HR-TEM), Fourier transform infrared and X-ray photoelectron spectroscopy (XPS). It shows emission of blue light at 410 nm when excited at 340 nm. High quantum yield of 21.7% and good biocompatibility were also observed. Importantly, the fluorescence intensity of CDs was selectively quenched after addition of Ag+. Based upon the aforementioned phenomenon, a new fluorescent biosensor for the detection of Ag+ was proposed. The linear range and detection limit was 5-70 μM and 1.06 μM, respectively. Eventually, these superior properties demonstrated that the CDs have promising applications in the field of environmental and biomedicine research.