The intensive cultivation of large soybean fields, combined with environmental factors such as light and shadow, challenges the accuracy of traditional manual and machine learning algorithms in identifying insect pests in these fields. In this study, a CBF-YOLO network was proposed for detecting common soybean pests in complex environments. The network was composed primarily of the CSE-ELAN, Bi-PAN, and FFE modules. The CSE-ELAN module enhanced feature extraction in both spatial and channel dimensions by incorporating the CSE feature enhancement structure into the ELAN structure of YOLOv7. The Bi-PAN module fused the features of three different scaled feature layers to provide more accurate pest detection features and localization information. The FFE module consisted of spatial and channel feature purification modules that refined the multi-scale fused features from Bi-PAN, further improving the expression ability of the fused features. Experimental results showed that the mAP of CBF-YOLO network reached 86.9% for detecting common soybean pests, with average precisions for detecting Caterpillar and Diabrotica speciosa pest-damaged leaves reaching 86.5% and 87.3%, respectively. Compared to the original model, the mAP of the CBF-YOLO network for detecting common soybean pests increased by 6.3%, significantly improving the model's detection performance. The CBF-YOLO network exhibited the highest mAP of 81.6% and performed well in detecting common soybean pests in actual complex environments, compared to deep learning networks like YOLOv5. This network provides a technical basis for detecting common soybean pests in challenging environments. The data and code used in this study can be accessed at https://github.com/2peacock/CBF-YOLO.