The occurrence rates of melanoma are rising rapidly, which are resulting in higher death rates. However, if the melanoma is diagnosed in Phase I, the survival rates increase. The segmentation of the melanoma is one of the largest tasks to undertake and achieve when considering both beneath and over the segmentation. In this work, a new approach based on the artificial bee colony (ABC) algorithm is proposed for the detection of melanoma from digital images. This method is simple, fast, flexible, and requires fewer parameters compared with other algorithms. The proposed approach is applied to the PH2 challenge, and Dermis datasets. These bases contained images are affected by different abnormalities. The formation of the databases consists of images collected from different sources; they are bases with different types of resolution, lighting, etc., so in the first step, the noise was removed from the images by using morphological filtering. In the next step, the ABC algorithm is used to find the optimum threshold value for melanoma detection. The proposed approach achieved good results in the conditions of high specificity. The experimental results suggest that the proposed method accomplished higher performance compared to the ground truth images supported by a Dermatologist.