The portable corrosive gas trace water laser analyzer uses the TDLAS second harmonic principle to detect the trace water content in the corrosive gas, and the laser beam output by the modulated light source is led out with an optical fiber and passes through the long optical path gas absorption cell, because the electrical signal is extremely weak after the optical path is converted by the photodetector, it also needs to be amplified by the preamplifier, and the second harmonic signal is extracted by the lock-in amplifier with frequency octave 2f as the reference signal, and the second harmonic signal contains the information of the gas concentration to be measured. After analog-to-digital conversion, the data is processed, and then the gas concentration to be measured is inverted through the Lambert-Beale law, which has high analysis accuracy and fast reaction speed, overcoming the shortcomings of the traditional method of large drift and easy to be affected by background gas such as H2 and O2.