According to the World Health Organization, cancer is the second highest cause of death in the world with 9.8 million. One of the most common types of cancer is skin cancer. In skin cancer, as in other types of cancer, early diagnosis is vital in the treatment process. Today, in the diagnosis of skin cancer, besides traditional methods, computer technology based methods such as Image Processing, Artificial Intelligence, Deep Learning, Artificial Neural Networks are frequently used. The most important advantage of these methods is that they do not contain human errors during the diagnosis process. On the other hand, one of the biggest problems is the inaccuracy in the diagnosis of cancer due to the fact that the hair cleansing and lesion segmentation cannot be performed correctly.This study presents a new UNET-based approach to clearing skin cancer lesions from hair noises and lesion segmentation. Two data sets of International Skin Imaging Collaboration (ISIC) were used in the study. As a result of the study, a success rate of 92% in hair removal and approximately 94% in lesion segmentation was achieved.