Land masking of Synthetic Aperture Radar (SAR) images is generally accomplished by applying either archived shoreline databases or image segmentation. However, those methods cannot be solely applied to geographical areas complicated with many small islands and exposed rocks. Therefore, we have proposed a new procedure where Sobel edge extraction is applied to detect the edges of all objects from KOMPSAT-5 X-band SAR images, followed by a merging process with the edges from the land objects based on Electronic Navigational Chart (ENC) coastlines. Using the land mask data, geometrically corrected SAR images were masked before applying a ship detection algorithm. This land masking procedure was applied to several images covering different areas of the Korean Peninsula. The results show that land targets such as newly constructed and natural objects were also masked, and thus did not create false alarms during ship detection. Therefore, this method can be used to assist precise ship detection using SAR images in coastal waters.