To overcome the temperature effect of NaI(Tl) detectors for energy spectrometry without additional hardware, a new correction method was put forward based on pulse deconvolution, trapezoidal shaping and amplitude correction, named DTSAC. To verify this method, actual pulses from a NaI(Tl)-PMT detector were measured at different temperatures from -20℃ to 50℃. Pulse processing and spectrum synthesis showed that the position drift of the 662 keV peak was less than 3 keV, and the corresponding resolution at 662 keV of the sum spectra ranges from 6.9% to 10.60% with trapezoidal width set as 1000 ns to 100 ns. The DTSAC method corrects temperature effect by pulse processing, and need no reference peak, reference spectrum and additional circuits. The method solves the problem of correction of pulse shape and pulse amplitude at the same time, and can be used even at high counting rate.