Reasonable guidance of local tax competition from the perspective of economic agglomeration is of great significance to the development of China's export economy. This paper analyzes the theoretical mechanism of the influence of local tax competition and economic agglomeration on the export behavior of enterprises, and empirically tests the spatial model using panel data of provinces and cities in China from 2000 to 2019. The results show that local tax competition significantly improves export behaviors of firms and presents an inverted U-shaped dynamic change in trend chronologically. The correlation effect of economic agglomeration shows that economic agglomeration can significantly reduce the sensitivity of enterprises' export behavior to local tax competition and effectively alleviate the “race to the bottom” of local tax, especially in the eastern coastal areas. Therefore, it is suggested that local governments should be reasonably guided to adopt competitive tax policies in accordance with local conditions to encourage the spatial agglomeration of capital, technology and population so as to promote the export of Chinese enterprises.