Aerial cameras often suffer from image motion due to the severe aerial environments that decrease the autofocus precision. An analysis of the influence of image motion on autofocus precision is provided to obtain the optimal focus position. First, the focus measure function based on discrete Fourier transform is applied to evaluate the sharpness of the collected image for autofocusing. Then, two forms of image motion model, including linear shift and jitter, are discussed and analyzed. Finally, a quadratic fitting curve is employed on the focus measure function for image sequence. The maximum of the fitted curve corresponds to the optimal focus position. Experimental results demonstrate that the maximum value of the focus measure function decreases more than 10% approximately when the image motion increases to five pixels, and the optimal focus position computed by quadratic fitted curve generated a good performance in autofocus techniques. The proposed autofocus algorithm can be applied to aerial cameras.