The invention relates to an online total nitrogen analyzer and a detection method thereof. The online total nitrogen analyzer comprises a peristaltic pump for providing sampling power, a metering module, a multiport valve, high-temperature and high-pressure valves, a detection module, and a high-temperature decomposition module, which are connected through a pipeline. The peristaltic pump is communicated with the metering module through the pipeline; the upper end of the metering module is communicated with the peristaltic pump, and the lower end is communicated with the multi-way valve; the multiport valve is communicated with a common pipeline of the metering module, the high-temperature decomposition module, the detection module, and a water sample, a measuring scale, a zero scale, liquid waste and at least one reagent pipeline in a reagent bin through different pipelines; the high-temperature and high-pressure valves are arranged at the upper and lower ends of the high-temperature decomposition module respectively, the lower end is communicated with the multiport valve, and the upper end is communicated with air. The online total nitrogen analyzer is small and compact in overall size, and simple in structure; the optical path design can eliminate interference of organic matters, the usage of the water sample and reagents is small, the treatment cost of the liquid waste is low, the expiration date of the reagents is long, the measurement is accurate, and the detection environment is stable.