A simple and sensitive device for the detection of nitrite and nitrate in environmental waters was developed based on visible light gas-phase molecular absorption spectrometry. By integrating a detection cell (DC), semiconductor refrigeration temperature-controlling system (SRTCY), and nitrite reactor into a sequential injection analysis system, trace levels of nitrite and nitrate in complex matrices were successfully measured. A low energy-consuming light-emitting diode (violet, 400–405 nm) was coupled with a visible light-to-voltage converter (TSL257) to measure the gas-phase molecular absorption. To reduce the interference of water vapor, an SRTCY was used to condense the water vapor on-line before the gas-phase analyte entered the DC. The DC was radiatively heated by the SRTCY to avoid water vapor condensation in the light path. As a result, the obtained baseline noise reduced 3.75 times than that of without SRTCY. Under the optimized conditions, the device achieved limits of detection (3σ/k) of 0.055 and 0.36 mmol/L (0.77 and 5.04 mg N/L) for nitrite and nitrate, respectively, and the linear calibration ranges were 0.1–15 mmol/L (R2 = 0.9946) and 1–10 mmol/L (R2 = 0.9995), respectively. Precisions of 5.2 % and 9.0 % were achieved for ten successive determinations of 0.3 mmol/L nitrite and 1.0 mmol/L nitrate, and the analytical times for nitrite and nitrate determination were 5 and 13 min, respectively. This method was validated against standard methods and recovery tests, and it was applied to the measurement of nitrite and nitrate in environmental waters. Moreover, a device was designed to enable the field measurement of nitrite and nitrate in complex matrices.