In order to identify the oil spills rapidly and accurately in SAR images, a detection method of oil spills in SAR images based on improved YOLOX-S was proposed. First, data enhancement and other pretreatment measures were done for collected SAR images of oil spills; second, improved FFDNet was used to reduce the speckle noise in SAR images, thus reducing the influence of things which were similar to oil spills on experimental results; finally, in order to fully extract the features of oil spills in SAR images, ECA module was added into YOLOX-S model to improve the identification accuracy of oil spills in SAR images. The experimental results showed that the improved YOLOX-S model could reduce the speckle noise in SAR images to some extent and identify quickly and accurately the oil spills in SAR images with accuracy rate of 86.76%.