We present a method for detecting inshore ships using high-resolution synthetic aperture radar (SAR) images. The method first applies preprocessing steps to obtain the solving region of an SAR image, suitable for the berthing rules. Then the ship candidates are extracted based on a maximally stable extremal region detector, while ship detection is applied using an improved constant false alarm rate (CFAR) detector. Finally, based on discrimination processing, false alarms are removed according to compactness, therefore the ultimate detection result is obtained without interference from strong terrestrial clutter or man-made objects. Experimental results show that this method could achieve effective detection of ships in harbors using high-resolution SAR images. This method can reduce the required computation time by 99.7%, compared with the traditional CFAR method.