Bactrocera dorsalis (Hendel) (Diptera: Tephritidae) is a global economic pest that poses a serious threat to the fruit industry. In the southwest of China, Yunnan Province sustains a severe infestation of B. dorsalis. An automated monitoring system designed for B. dorsalis was employed in this study to elucidate the annual population dynamics of B. dorsalis in four counties: Yuanjiang, Huaping, Guangnan, and Ludian in Yunnan. The system utilizes sex parapheromone and image recognition technology. The data uploaded by the device are used to analyze the annual population dynamics of B. dorsalis in different regions. The results showed that the populations of adult B. dorsalis in all four counties peaked twice annually, with Yuanjiang experiencing the earliest peak periods, followed by Huaping, Guangnan, and Ludian. Adult B. dorsalis occurred in Yuanjiang throughout the year, and Yuanjiang had the highest number of B. dorsalis monitored. In Huaping, adult B. dorsalis occurred in March–December and was highly active, with a high population density in 2019. Bactrocera dorsalis did not occur in December in Guangnan but only in May–October in Ludian. Bactrocera dorsalis abundance was correlated with temperature in all four areas. The outcomes of this experiment provide a practical foundation for developing control strategies targeting B. dorsalis in various orchards across each county.