A lightweight wind turbine blade surface multiple class defect detection algorithm based on You Only Look Once version 5 (YOLOv5) is proposed to address the issues of low accuracy, poor efficiency, and high power consumption associated with manual and traditional automation algorithms used for detecting surface defects on wind turbine blades. Firstly, by replacing the Concentrated-Comprehensive Convolution Block module in YOLOv5 with the GhostBottleneckv2 module, the overall parameter count of the model is significantly reduced. Additionally, advocating the inclusion of the Convolutional Block Attention Module (CBAM) into the YOLOv5 backbone network to address the issue of small targets and significant scale variations in surface defects found on wind turbine blades. The YOLOv5 feature fusion module replaces the Feature Pyramid Network (FPN) structure with the Bidirectional Feature Pyramid Network (BiFPN) structure to enhance the fusion capability of multi-scale weighted features. Finally, the optimized model files underwent structured pruning through the application of pruning strategies, retraining fine-tuning, and knowledge distillation techniques. The experimental results on the self-made dataset of surface defects on wind turbine blades indicate that the optimized model has a parameter count that is only 48.79% of the small version of the YOLOv5 model. However, its mean Average Precision (mAP) and frame rate have increased by 5.05% and 8.1 frames/s, respectively, reaching 94.56% and 43.7 frames/s. The lightweight algorithm proposed in this study meets the accuracy and real-time requirements for surface defect detection on wind turbine blades.