The ship target detection methods using Synthetic Aperture Radar (SAR) images have a wide range of practical applications in many fields such as surveillance on the sea surface, trade to and from the sea surface, and emergency rescue on the sea surface, etc. With the demand for the development of autonomous processing in satellite orbits, the real-time in-orbit detection and localization of ships from SAR images have put forward higher requirements. Therefore, this paper proposes a lightweight SAR image ship detection algorithm in a complex background for the current problems of limited satellite hardware resources, diverse and differentiated feature scales of different ship targets in Synthetic Aperture Radar (SAR) images, and easy to be interfered by noise. First of all, the FasterNet network model combined with the attention mechanism is used to extract different high and low level features of the target. Second, in order to solve the problem of scale inconsistency between different targets, this paper constructs a Feature Enhancement Module (FEM) that can not only increase the network sensory field at the same time but also improve the ability of network target detection. Then, a multiscale feature fusion structure combined with feature enhancement is constructed in this paper, which can enhance and fuse the multi-scale features extracted by the backbone feature extraction network, and can also strengthen the connection between the features of different layers of the network while obtaining the multi-scale contextual information of the target, and carry out the detection of the SAR image ship in the three feature maps output from the multi-scale feature fusion structure combined with feature enhancement. Experiments are conducted to compare the proposed method with some other mainstream target detection algorithms on SSDD, HRSID, and merged SSDD and HRSID datasets. The results show that the average accuracy of the proposed methods on three datasets in this paper is 98.6%, 92.3% and 93.0%, respectively. The recall of the method in this paper is 95.10%, 85.10% and 86.8%, respectively, for three datasets. The model size and parameter number of the proposed method in this paper are only 8.8 MB and 4.2 M, respectively. The proposed method significantly outperforms other algorithms in terms of recall and average accuracy ratio. Moreover, the method in this paper also has great advantages in terms of checking accuracy and detection rate, which is favorable to be migrated to other practical applications. © 2024 Science Press. All rights reserved.