The ship detection through satellite images is playing a pivotal role in the field of maritime defense like the “traffic surveillance, protection against illegal fisheries, oil discharge control and sea pollution monitoring”. The Automated Identification System (AIS) make use of the VHF radio frequencies to broadcast the location of the ship, destination of the ship, the uniqueness in close proximity receiver devices on other ships and land-based systems. The AIS can only monitor the ships that have installed the VHF transponder legally, but fail to detect the others with no VHF transponder; and those which have disconnected transponders. In this scenario, satellite imagery can help. The SAR imagery makes use of the radio waves to image the surface of the earth. In this research work, a novel ship detection method based on deep learning is introduced to identify the ship targets sturdily and precisely. The procedure of proposed ship detection encapsulates the following three main stages: target-background segmentation, ship localization and ship detection. In general, the SAR images include complex coastal land, which results in increasing the testing time and reducing the detection accuracy. Therefore, from the collected SAR images, the target and the background regions are segmentation (i.e. isolated ship area from land or sea area) via Otsu thresholding approach. Subsequently, the localization of the ship is done precisely by computing the unique area-based properties of the ship. Then, the activation function of the Convolutional Neural Network (CNN) in the detection phase is fine-tuned using a new Improved PSO algorithm (IPSO). The proposed work is evaluated in terms of algorithmic and classifier performance. © 2022, The Author(s), under exclusive licence to Springer Nature Singapore Pte Ltd.