Melanoma is one of the most dangerous tumors in the human kind cancers. Nonetheless, early detection of this cancer can help the doctors to cure it perfectly. In this paper, a new efficient method is proposed to detect the malignant melanoma images from the images. In the proposed method, a hybrid technique is utilized. We first eliminate the extra scales by using edge detection and smoothing. Afterwards, the main hybrid technique is applied to segment the cancer images. Finally by using the morphological operations, the extra information is eliminated and used to focus on the area which melanoma boundary potentially exists. Here, Gray Wolf Optimization algorithm is utilized to optimize an MLP neural Networks (ANN). Gray Wolf Optimization is a new evolutionary algorithm which recently introduced and has a good performance in some optimization problems. GWO is a derivative-free, Meta Heuristic algorithm, mimicking the ecological behaviour of colonizing weeds. Gray wolf optimization is a global search algorithm while gradient-based back propagation method is local search. In this proposed algorithm, Multi-Layer Perceptron Network (MLP) employs the problem's constraints and GWO algorithm tries to minimize the root mean square error. Experimental results show that the proposed method can develop the performance of the standard MLP algorithm significantly.