Rapid and precise detection of maize pests at an early stage is important for reducing the economic loss of crops. To address the problem of poor and inefficient identification of maize pests in practical production environments, this study proposed an intelligent detection method for maize pests based on the StyleGAN2 and FNW YOLOv8 methods. Expanded maize pest data from StyleGAN2-ADA. In the feature extraction network, the replacement of a FasterNet lightweight network reduces the model complexity and speeds up detection. The normalization-based attention module (NAM) is integrated into the back end of the signature convergence network to suppress redundant non-significant feature representations. After optimizing the loss function via Wise Intersection of Union v3 (WIoU v3), the FNW YOLOv8 algorithm was introduced. The findings indicate that this algorithm enhances the precision and F1 scores by 3.77% and 5.95%, respectively, when compared to the baseline model. Notably, the FNW YOLOv8 model achieved real-time detection speed of 289.1 fps. Compared to normal models, the FNW YOLOv8 model addresses the limitations associated with standard models, including excess weight. The parameters for FNW YOLOv8 were minimized to just 1.74 million, resulting in a compact model size of 2.36 MB. At the same time, there was a significant decrease in the GFLOPS operations of the FNW YOLOv8. Consequently, to ensure the precision and timeliness of maize pest identification, it is essential to establish a theoretical foundation for their identification and detection on mobile devices.