[Objectives] To determine whether the great spotted woodpecker Dendrocopos major (GSW), an important predator of stem boring pests, can be used as a biological control for the longhorn beetle, Anoplophora glabripennis (ALB), in the Hexi Corridor of Gansu province. [Methods] Control of ALB by the GSW was monitored in 4 different habitats in Suzhou District, Jiuquan City from 2018 to 2021. The rate of decline of the ALB population and the proportion of infested plants were counted, and transects were used to count the number of GSW and GSW peck marks per unit area (6.67 hm²). [Results] The ALB population declined in control plots in all four habitats. In test plots, the proportion of insect-infested plants decreased significantly, and the corrected rate of insect population decline steadily accelerated. There was an upward trend in the number of GSW found per unit area and the number of peck marks in the 4 habitats. Over the past 4 years, the number of peck marks in experimental plots has increased yearly. With the exception of Jiuquan park, the number of peck marks has continued to increase annually. The rate of increase in peck marks in the other three plots peaked in 2018, and has since slowed down. The frequency of GSW per unit area in the West Han Dynasty Jiuquan scenic spot, Wutong garden and Xifeng experimental station is significantly, negatively correlated with the proportion of insect-infested plants. [Conclusion] Introducing the GSW can effectively control ALB and habitat quality appears to be the main factor affecting the success of such biological control. If suitable GSW habitat can be created in the Hexi Corridor, then effective biological control of stem-boring pests such as the ALB is feasible. [ABSTRACT FROM AUTHOR]