To localize a moving source in shallow water with a single hydrophone, a passive range localization method based on synthetic aperture beamforming is proposed. First, the horizontal wavenumber spectrum excited by the source is obtained by synthetic aperture beamforming. Then, according to the theoretical derivation (when the integration time is short, the maximum value of the horizontal wavenumber spectrum is related to the average horizontal wavenumber and the radial velocity of the source), the radial velocity can be obtained after obtaining the average horizontal wavenumber. Finally, in the case where there is a closest point of approach (CPA), the range can be recovered from estimation of the range and time of CPA, and from the constant source speed alone the linear track by fitting the source velocity with the model of radial velocity. The only a priori information required is the sound velocity in water. The processing results using simulated data and SWellEx-96 experimental data show that the proposed method can effectively estimate the range of a moving source in shallow sea.