The invention discloses a detection device and a detection method of nitrite or nitrate content. The detection device comprises a peristaltic pump, a flowing cuvette, a light source, an optical receiver, a cadmium ring and seven three-way electromagnetic valves, wherein sampling, circulation, developing, reduction and waste discharging are realized via controlling of the peristaltic pump and selection of the three-way electromagnetic valves, so as to shorten the flow path of the detection device, and ensure high integration level, small size and on-line analysis suitability. Via circulation design, the reaction efficiency is greatly improved; reaction products in the whole loop are uniform in concentration; an average value can be obtained via repeated measurement; the parallelity and the stability are greatly improved. Moreover, the cadmium ring is taken as a reduction component, and a sample solution to be detected flows in the cadmium ring at a certain speed, so that not only is the reduction efficiency improved, but also repeated filling is avoided, and the operation is convenient and fast; use of poisonous and harmful reagents is avoided.