Hylurgus ligniperda, an invasive species originating from Eurasia, is now a major forestry quarantine pest worldwide. In recent years, it has caused significant damage in China. While traps have been effective in monitoring and controlling pests, manual inspections are labor-intensive and require expertise in insect classification. To address this, we applied a two-stage cascade convolutional neural network, YOLOX-MobileNetV2 (YOLOX-Mnet), for identifying H. ligniperda and other pests captured in traps. This method streamlines target and non-target insect detection from trap images, offering a more efficient alternative to manual inspections. Two cascade convolutional neural network models were employed in two stages to detect both target and non-target insects from images captured in the same forest. Initially, You Only Look Once X (YOLOX) served as the target detection model, identifying insects and non-insects from the collected images, with non-insect targets subsequently filtered out. In the second stage, MobileNetV2, a classification network, classified the captured insects. This approach effectively reduced false positives from non-insect objects, enabled the inclusion of additional classification terms for multi-class insect classification models, and utilized sample control strategies to enhance classification performance. Application of the cascade convolutional neural network model accurately identified H. ligniperda, and Mean F1-score of all kinds of insects in the trap was 0.98. Compared to traditional insect classification, this method offers great improvement in the identification and early warning of forest pests, as well as provide technical support for the early prevention and control of forest pests. © 2024 Society of Chemical Industry.