In industrial production, the steel surface may incur different defects owing to the influence of external factors, thereby affecting the performance of steel. With the increasing requirements for steel quality, achieving efficient detection of steel surface defects is a difficult problem that urgently needs to be solved. Traditional steel surface defect detection methods are limited by poor detection performance and slow detection speed. Therefore, a model named LMS-YOLO, based on YOLOv8, is proposed in this paper for achieving efficient steel surface defect detection. Firstly, in backbone, the LMSMC module is designed to fuse with C2f to obtain C2f LMSMC, so as to extract the features of different scales for fusion and achieve the light weight of the network. Meanwhile, the proposed attention mechanism EGAM was added to backbone to enhance cross dimensional information interaction and feature extraction capabilities, and to achieve a more efficient attention mechanism. In neck, BiFPN is used to achieve better cross scale fusion effect. Finally, the model uses three independent decouple heads for regression and classification, and replaces CIoU with NWD as the regression loss to enhance the effect of detecting small scale defects and improve the detection accuracy. The experimental results show that the proposed LMS-YOLO obtains 81.1mAP on NEU-DET and 80.5mAP on GC10-DET, which indicates that the model proposed in this paper has a better comprehensive performance compared with other methods in steel surface defect detection.