The prompt gamma neutron activation analysis (PGNAA) technology is an online nondestructive material analysis technology widely used in industries. In order to achieve real-time measurements, the gamma ray count rate should reach 400 kcps. Due to the limitation of the detector’s decay time, the signal output from the detector is heavily piled up. Meanwhile, the industrial site has a temperature fluctuation of 0-50 °C, causing the peak drift in the energy spectrum. This paper presents a readout electronic system specified for PGNAA and proposes series of algorithms that are dedicated for the gamma-ray spectrometric system. The system can achieve a count rate of 400 kcps, and it overcomes poor resolution, spectral distortion, and peak position shift, which are caused by pulse pileups and temperature fluctuations.