In recent years, skin cancer has been recognized as the most dangerous and common type of cancer in humans. Melanoma is a common skin cancer, and the diagnosis of melanoma in the early stages of the disease can significantly prevent death from this deadly skin cancer. Providing a method that facilitates the diagnosis of melanoma in the early stages is very useful and valuable. The current paper proposes a new methodology for the best diagnosis of melanoma cancer using dermoscopic images. The proposed method begins with a normalization of scaling the data to a standard range and a histogram equalization to enhance the quality of the input images. Then, some different features based on the Gray-Level Co-occurrence Matrix (GLCM) are extracted from the image. GLCM features capture the spatial distribution and correlation of the pixel intensities, which reflect the texture information of the images. For reducing the complexity of the method, minimum features have been selected using a newly Developed version of Archimedes Optimization Algorithm (DAOA). Then, the selected features are classified by a Support Vector Machine (SVM) to distinguish between benign and malignant lesions. The proposed method is applied to the American Cancer Society (ACS) dataset, which consists of 68 pairs of TLM and XLM images with a size of 180×180 pixels. The results have been compared with five different methods based on five performance indicators: precision, sensitivity, accuracy, specificity, and F-measure. The results indicate that the presented approach gives a proper efficiency for the diagnosis of the melanoma. The proposed method achieves the highest values for all the performance indicators among the compared methods. The proposed method achieves an accuracy of 88 %, a sensitivity of 96 %, a specificity of 81 %, a precision of 97 %, and an F-measure of 97 % for the diagnosis of melanoma.