The butterfly classification algorithm aims to protect butterfly species diversity and observe atmospheric changes. In this study, we propose a butterfly classification algorithm based on transfer learning and improve AlexNet for more accurate identification of butterfly species and to resolve the issue of the long running time of the complex network algorithm. The proposed algorithm considers AlexNet as the pre-training model and uses it as a feature extractor for the new model. For this, we adjust the number of convolution kernels, replace the local response normalization layer, reduce the number of full connected layers, and increase the mean-pooling layer. Our experimental results show that the improved algorithm has higher accuracy and better recognition efficiency than the original AlexNet algorithm for butterfly species recognition.