4-Nitrophenol (4NP) is a vital intermediate in organic industries, and its exploitation creates serious environmental issues. We propose a fluorescence quenching-based strategy with nitrogen and sulfur co-doped carbon dots (NS-CDs) for highly sensitive 4NP detection with excellent selectivity. The NS-CDs are produced through the hydrothermal process, in which citric acid serves as a carbon source and cysteamine hydrochloride as a source of N and S. The effect of doping was also studied by synthesizing undoped CDs and examining their properties. As-developed NS-CDs exhibit a bright cyan blue color with maximum emission centered at 465 nm. The fluorescence of NS-CDs is significantly quenched in an approximately linear fashion with increasing 4NP concentration (7.5–97.5 μM). The inner filter effect (IFE) and static quenching (SQ) between NS-CDs and 4NP are responsible for such fluorescence reduction. The fluorimetry technique enables the quantification of 4NP with a limit of detection (LOD) of about 0.028 μM. Moreover, the fluorescence quenching is tested for several other chemical compounds but they generate false quenching signals; only 4NP leads to fluorescence quenching of NS-CDs, demonstrating excellent selectivity. The “turn-off” fluorescence properties and visually apparent color change of the fluorescent probe reveal the excellent performance for 4NP sensing. The NS-CDs’ capability of quantifying 4NP in real water samples (tap water and drinking water) produces an excellent recovery rate ranging between 96.24 and 98.36%.