In order to address the low azimuth imaging problem of traditional Range Doppler (RD) algorithm, a high-resolution imaging algorithm with optimal azimuth sampling sequence length (SSL) constraints is hereby proposed. According to this algorithm, efforts are made to design a formula for the calculation of the initial azimuth SSL on the basis of SAR azimuth imaging parameters. Having obtained the initial SSL and the criteria for the evaluation of SAR imaging performance, we continue to figure out the extreme values of the curve within a reasonable range of variation. On the basis of these values, the optimal azimuth SSL can be determined to provide data support for global azimuth imaging. Measurement data from imaging experiments on airborne and spaceborne SARs show that, compared with traditional RD algorithm, the proposed algorithm reveals outstanding advantages as indicated by a number of factors critical for the evaluation of imaging performance, such as resolution, peak sidelobe ratio (PSLR) and integral sidelobe ratio (ISLR). Compared with reference methods with local optimal imaging performance, the proposed algorithm can help to obtain global optimal SAR imaging data.