To enhance agricultural productivity through the accurate detection of pests under the constrained resources of mobile devices, we introduce LP-YOLO, a bespoke lightweight object detection framework optimized for mobile-based insect pest identification. Initially, we devise lightweight components, namely LP_Unit and LP_DownSample, to serve as direct substitutes for the majority of modules within YOLOv8. Subsequently, we develop an innovative attention mechanism, denoted as ECSA (Efficient Channel and Spatial Attention), which is integrated into the network to forge LP-YOLO(l). Moreover, assessing the trade-offs between parameter reduction and computational efficiency, considering both the backbone and head components of the network, we use structured pruning methods for the pruning process, culminating in the creation of LP-YOLO(s). Through a comprehensive series of evaluations on the IP102 dataset, the efficacy of LP-YOLO as a lightweight object detection model is validated. By incorporating fine-tuning techniques during training, LP-YOLO(s)n demonstrates a marginal mAP decrease of only 0.8% compared to YOLOv8n. However, it achieves a significant reduction in parameter count by 70.2% and a remarkable 40.7% increase in FPS, underscoring its efficiency and performance.