A long-term integration algorithm using the HPRF stepped frequency waveform is presented to improve the range and Doppler resolution of moving targets. A stepped frequency radar signal is applied to realize high range resolution; a long-term integration is applied to realize high Doppler resolution. Besides, with the long-term integration, the gain from coherent integration can also be improved a lot, which is of great benefit to the detection of small targets. During this processing, a segment accumulation method is proposed to reduce the storage and computational requirements; a velocity compensation method based on the keystone transform is presented to overcome the image aliasing due to the coupling effects of moving targets; then a synthetic high resolution image generation method is introduced to synthesize an unambiguous range-Doppler image of moving targets. Finally the performance of this algorithm is demonstrated using simulated data as well as experimental results.