As a ranging sensor, a continuous transmission frequency modulation (CTFM) sonar with its ability for range finding and range profile formation works effectively under stationary conditions. When a relative velocity exists between the target and the sonar, the echo signal is Doppler-shifted. This situation causes the output of the sensor to deviate from the actual target range, thus limiting its applications to stationary conditions only. This work presents an approach for correcting such a deviation. By analyzing the Doppler effect during the propagation process, the sensor output can be corrected by a Doppler factor. To obtain this factor, a conventional CTFM system is slightly modified by adding a single tone signal with a frequency that locates out-of-sweep range of the transmitted signal. The Doppler factor can be extracted from the echo. Both verification experiments and performance tests are carried out. Results indicate the validity of the proposed approach. Moreover, ranging precision under different processing setups is discussed. For adjacent multiple targets, the discrimination ability is influenced by displacement and velocity. A discrimination boundary is provided through an analysis.