Based on the panel data of 283 prefecture-level cities in China from 2011 to 2019, this study constructed an index measurement system of digital economy, economic agglomeration, innovation and entrepreneurship, and employment structure. The index of digital economy was developed by entropy weight method, and the double-fixed spatial Durbin model was constructed based on the intermediary effect from the spatial perspective to determine the direct effect, indirect effect, and total effect of the digital economy, economic agglomeration degree, and innovation and entrepreneurship on employment structure. The results indicated a significant spatial correlation between the three aspects, i.e., digital economy can significantly optimize the employment structure, with an evident spillover effect. The mechanism analysis revealed that the level of innovation and entrepreneurship poses a stronger intermediary effect than the degree of economic agglomeration, and the digital economy in the eastern region directly impacts the urban employment structure; however, the influence of digital economy on the employment structure is significantly higher in small- and medium-sized cities than in large-sized cities.