Phenolic compounds, especially 4-nitrophenol (4-NP), and chromium (VI) are highly toxic environmental pollutants. Thus, it is significantly important to establish a rapid and sensitive sensor for 4-NP and Cr(VI) monitoring in environment. In this paper, a novel approach has been adopted where E. coli-derived CDs (CDs-WT) prepared by one step hydrothermal method previously and sensitized by ampicillin (turn-on) were used as fluorescence nanoprobe (CDs-WT-Amp) for 4-NP and Cr(VI) determination based on the inner filter effect quenching mechanism (turn-off). Then, the quenching fluorescence was reversed by addition of ampicillin (turn-on). The linear ranges of 4-NP and Cr(VI) detection were 0–50[Formula: see text][Formula: see text]M and 0–25[Formula: see text][Formula: see text]M, with the limits of detection 88.89[Formula: see text]nM and 64.75[Formula: see text]nM, respectively. The “turn-on-on-off-on” fluorescent nanosensor system was successfully used to determine Cr(VI) and 4-NP in water with satisfactory results. It shows that the “turn-on-off-on” nanoprobe has great promising potential for application to environmental pollutant detection.