Skin cancer is the most common cancer, accounting for 75% of all skin cancers worldwide. Malignant melanoma is the most invasive type of skin cancer, which is deadly. Some techniques have been investigated to diagnose skin diseases using skin tissue classification and diagnosis models and skin recognition approaches using colors based on image retrieval methods. In this regard, image processing techniques and classification methods are intelligent. The purpose of this method, diagnosing melanoma skin cancer using image processing. In the proposed method, after collecting the dataset, the boundary to separate the skin lesion from the background was specified. Then in the next step, the analysis was performed using Empirical wavelet transform (EWT). Then the color, texture, and shape features were extracted. In the next step, the feature was selected by Gray Wolf meta-heuristic algorithm using ranking models and the disease was classified into two categories, namely normal and abnormal. The database used in this study contains 594 dermatoscopic images with a resolution of 512 × 768 pixels, 476 images with normal spots, and 88 images with abnormal spots caused by melanoma. The evaluation results revealed that the proposed method had an accuracy of 97.25, indicating its significant performance compared to other methods. The contribution of the results of the proposed method can be very useful and valuable in the future for early detection of skin cancer.