To set up effective analysis method is important for environmental monitoring. In this work, the 4-aminophenol functionalized nitrogen and sulfur co-doped carbon quantum dots (AP-NSCDs) were synthesized based on the functionalization of NSCDs obtained by one-step hydrothermal method and used as a new fluorescent sensor for the determination of nitroalkene pesticide and medicine, such as nitenpyram, nizatidine and ranitidine. Nitroalkenes could quench the fluorescence of the functionalized carbon dots due to the fluorescence resonance energy transfer (FRET) principle. The sensor showed high sensitivity, selectivity, and stability, with a wide linear range of 0.05 ∼ 10 mg/L and a low detection limit of 0.02 mg/L. This sensor was successfully employed to detect nitenpyram in rice, orange and cabbage, and to determine nizatidine and ranitidine in serum, urine and river water as well. The developed method was rapid and sensitive, and had potential for monitoring the nitroalkene compounds in the environment and food.