In recent years, intelligent automation in the healthcare sector becomes more familiar due to the integration of artificial intelligence (AI) techniques. Intelligent healthcare systems assist in making better decisions, which further enable the patient to provide improved medical services. At the same time, skin lesion is a deadly disease that affects people of all age groups. Skin lesion segmentation and classification play a vital part in the earlier and precise skin cancer diagnosis by intelligent systems. However, the automated diagnosis of skin lesions in dermoscopic images is challenging because of the problems such as artifacts (hair, gel bubble, ruler marker), blurry boundary, poor contrast, and variable sizes and shapes of the lesion images. This study develops intelligent multilevel thresholding with deep learning (IMLT-DL) based skin lesion segmentation and classification model using dermoscopic images to address these problems. Primarily, the presented IMLT-DL model incorporates the Top hat filtering and inpainting technique for the pre-processing of the dermoscopic images. In addition, the Mayfly Optimization (MFO) with multilevel Kapur's thresholding-based segmentation process is involved in determining the infected regions. Besides, an Inception v3 based feature extractor is applied to derive a valuable set of feature vectors. Finally, the classification process is carried out using a gradient boosting tree (GBT) model. The presented model's performance takes place against the International Skin Imaging Collaboration (ISIC) dataset, and the experimental outcomes are inspected in different evaluation measures. The resultant experimental values ensure that the proposed IMLT-DL model outperforms the existing methods by achieving higher accuracy of 0.992.