High-frequency surface wave radar (HFSWR) has a vital civilian and military significance for continuous maritime surveillance of activities within exclusive economic zone. However, HFSWR has lower spatial and temporal resolutions and the received signals are strongly polluted by different clutter and background noise. Therefore, ship target detection by HFSWR has become a challenging task. This letter presents an automatic ship target detection algorithm based on discrete wavelet transform (DWT). First, a peak signal-to-noise ratio-based algorithm is proposed to automatically determine the optimal scale of DWT for extraction of ship targets. Second, the high-frequency coefficients of DWT at the optimal scale are processed by a fuzzy set-based method to enhance the useful target information and depress the unwanted background noises. Third, a target-highlighted image is reconstructed by ignoring all the low frequency coefficients and performing inverse DWT only to the enhanced high-frequency coefficients. Finally, the targets are extracted by adaptive threshold segmentation of the final target-highlighted image. Experimental results show that the proposed approach can automatically extract ship targets effectively for range Doppler images with complex background, and has a better target detection performance than the previous wavelet-based algorithm, thereby providing a new reliable image processing-based method of ship target detection for HFSWR.