Water contamination by heavy metals is a global issue for environmental safety and new technologies have been developed aim to evaluate the contamination, mainly by anthropogenic action. In this work, we synthesized blue light‐emitting carbon dots (CDs) from ionic sources for sensing applications of heavy metal cations in an aqueous solution. Spectroscopic and morphologic characteristics of the CDs were performed using Fourier transform infrared (FTIR) spectroscopy, fluorescence, and absorption techniques, besides transmission electron microscopy (TEM), dynamic light scattering (DLS), and zeta potential (ZP) measurements. Moreover, a two‐level full factorial design of experiments (DOE) was carried out to achieve the best hydrothermal parameters of synthesis, including the number of mols of precursors, temperature, and reaction time. The pH and buffer nature were evaluated for the quantification step to improve the N,S‐CDs response. We have obtained a range of 2.23–8.57 μmol L−1 (among Bi3+, Cd2+, Hg22+, Hg2+, Pb2+, and Sb3+) in terms of limit of detection (LOD). These aspects frame the material as a potential sensor for the identification of heavy metals in water.