Skin cancer is the most common type of cancer in the world and the incidents of skin cancer have been rising over the past decade. Even with a dermoscopic imaging system, which magnifies the lesion region, detecting and classifying skin lesions by visual examination is laborious due to the complex structures of the lesions. This necessitates the need for an automated skin lesion diagnosis system to enhance the diagnostic capability of dermatologists. In this study, the authors propose an automatic skin lesion segmentation method which can be used as a preliminary step for lesion classification. The proposed method comprises two major steps, namely preprocessing and segmentation. In the preprocessing step, noise such as illumination, hair and rulers are removed using filtering techniques and in the segmentation phase, skin lesions are segmented using the GrabCut segmentation algorithm. The k-means clustering algorithm is then used along with the colour features learnt from the training images to improve the boundaries of the segments. To evaluate the authors' proposed method, they have used ISIC 2017 challenge dataset and PH2 dataset. They have obtained Dice coefficient values of 0.8236 and 0.9139 for ISIC 2017 test dataset and PH2 dataset, respectively. © 2018, The Institution of Engineering and Technology.