Synthetic Aperture Radar (SAR) ship detection is applicable to various scenarios, such as maritime monitoring and navigational aids. However, the detection process is often prone to errors due to interferences from complex environmental factors like speckle noise, coastlines, and islands, which may result in false positives or missed detections. This article introduces a ship detection method for SAR images, which employs deep learning and morphological networks. Initially, adaptive preprocessing is carried out by a morphological network to enhance the edge features of ships and suppress background noise, thereby increasing detection accuracy. Subsequently, a coordinate channel attention module is integrated into the feature extraction network to improve the spatial awareness of the network toward ships, thus reducing the incidence of missed detections. Finally, a four-layer bidirectional feature pyramid network is designed, incorporating large-scale feature maps to capture detailed characteristics of ships, to enhance the detection capabilities of the network in complex geographic environments. Experiments were conducted using the publicly available SAR Ship Detection Dataset (SSDD) and High-Resolution SAR Image Dataset (HRSID). Compared with the baseline model YOLOX, the proposed method increased the recall by 3.11% and 0.22% for the SSDD and HRSID, respectively. Additionally, the mean Average Precision (mAP) improved by 0.7% and 0.36%, reaching 98.47% and 91.71% on these datasets. These results demonstrate the outstanding detection performance of our method.