In order to obtain a high resolution synthetic aperture radar (SAR) image, it is necessary to use the autofocus algorithm for SAR image processing. In this paper, theory of contrast optimization autofocus (COA) algorithm is introduced. The process of COA is described as an optimal one dimension searching model. Then, theory of variable step searching and golden section algorithm is presented. First, convergence region is set by variable step searching. Then, by means of iteration, the golden section method is applied. And the iterative process may be continued until the end condition is met. Finally, the optimal estimation of Doppler chirp rate is acquired. Compared with the existing methods, the proposed algorithm has the advantages of fast convergence speed and strong robust ability. The obtained results prove the validity of this algorithm.