Distracted driving is one of the main causes of road traffic accidents. With the rapid development of deep learning technology, the detection and classification of drivers' distracted driving behaviors have put forward higher accuracy requirements. However, the existing deep learning methods are computationally intensive and have many redundant parameters, which limits their efficiency and accuracy in practical applications. To solve this problem, this paper proposes an improved YOLOv8 driver distracted driving behavior detection method based on the original YOLOv8 model by integrating the BoTNet module, the GAM attention mechanism and the EIoU loss function. By optimizing the feature extraction and multi-scale feature fusion strategies, the model training and inference processes are simplified, and the detection accuracy and efficiency are significantly improved. Experimental results show that the improved model excels in both detection speed and accuracy, with an accuracy of 99.4%, and the model is small and easy to deploy. The model is able to identify and classify distracted driving behaviors in real time and issue timely alerts when dangerous driving behaviors are detected, thus improving driving safety.