The emergence of high-speed railroad accelerates the flow and redistribution of production factors such as human, logistics and capital flows, which has a significant impact on the economy growth of counties. Based on the panel data of 58 counties in Anhui Province from 2003 to 2020, the DID model is applied to analyze the impact of high-speed railway opening on county economy growth in Anhui Province. It is found that the opening of high-speed rail has a significant positive impact on county economy growth as a whole; the heterogeneity analysis shows that the opening of high-speed rail has a significant positive impact on the economy growth of counties with large population, but a significant negative effect on the counties with small population. Additionally, impact mechanism analysis demonstrates that the loss of labor force will reduce the positive impact of high-speed rail on county economy growth. Finally, this study provides reasonable policy suggestions for county economy development and future planning of high-speed railway, thus helping to realize the rapid development of county economy in Anhui province.