Skin lesion detection has gained a lot of attention in the last couple of years due to the spread of skin cancer around the world. System-assisted design requires training and classification structure that can only be precise if features are selected appropriately along with improved segmentation of the lesion. This paper introduces a hybrid classification and training algorithm architecture that uses machine learning in all aspects of training and feature selection. The algorithm has been improved by adding novel behavior of Particles and Moth flames to be precise on nature. The proposed algorithm uses a multilayer propagation network for training and classification. The proposed work has been compared with other state-of-the-art algorithms based on quantitative parameters. The proposed work shows a significant improvement in all parameters and aspects.