Melanoma is one of the most dangerous types of skin cancer that its early detection can save patients' lives. Computer‐aided methods can be used for this early detection with acceptable performance. In this study, a system is proposed to detect melanoma automatically using an ensemble approach, including convolutional neural networks (CNNs) and image texture feature extraction. Two CNN models, a proposed network and the VGG‐19, were employed to classify images in the CNN phase. Furthermore, texture features were extracted, and their dimension was reduced using kernel principal component analysis (kPCA) to improve the classification performance in the feature extraction‐based phase. The results of each step were then combined to obtain the final diagnosis. The proposed method was evaluated on three databases, that is, ISIC 2016, ISIC 2019, and PH2. The accuracy, average precision, sensitivity, and specificity of the proposed method on the ISIC 2016 dataset were 85.2%, 66%, 52%, and 93.4%, respectively. These evaluation metrics for the ISIC 2019 database were obtained equal to 96.7%, 95.1%, 96.3%, and 97.1%, respectively. Furthermore, the accuracy, sensitivity, and specificity of the proposed method on the PH2 dataset were 97.5%, 100%, and 96.88%, respectively. According to the experimental results, the ensemble method improves the evaluation metrics compared to each phase separately. Besides, the proposed approach can increase the performance of melanoma detection, compared to previous studies.