Moving target detection plays a pivotal role in many applications, especially in radar systems. In addition, time-reversal (TR) technology can improve radar detection probability by effectively solving the problem of multipath signals. However, detection performance can be affected when clutter exists and target Doppler shifts are unknown. For this reason, we propose a novel moving target detection algorithm that leverages TR technology and a novel waveform optimization method in clutter and multipath signal environments. In this paper, we establish a TR signal model for a moving target in such environments and derive the TR average likelihood ratio test (TR-ALRT) detector. Additionally, we introduce a waveform optimization method that adapts to clutter and unknown Doppler information further to enhance the performance of the TR-ALRT detector. Consequently, a TR-ALRT waveform optimization (TR-ALRT-WO) detector is derived to adapt to the unknown Doppler and environment information, thereby improving the detection probability. Comparative analysis with other detectors under the same conditions validates the effectiveness of our proposed TR-ALRT-WO detector. Furthermore, numerical experiments demonstrate the superior performance of the proposed detection algorithm.