The location choices of digital enterprises play a crucial role in shaping regional economic patterns and driving the development of the digital economy. This study employs a negative binomial regression model to investigate the impact of market accessibility and agglomeration economies on the location decisions of digital enterprises. Utilizing Chinese enterprise registration data, we construct market accessibility indicators that encompass multiple modes of transportation as well as agglomeration economy indicators reflecting urbanization and localization economies. The results revealed the following: (1) Market accessibility significantly influences the location of digital enterprises. Regions with higher demand accessibility attract significantly more digital enterprises, whereas the effect of supply accessibility is relatively weak. (2) Both urbanization and localization economies attract digital enterprises, with localization economies having a relatively strong effect. (3) The effects of market accessibility and agglomeration economies on the entry of digital enterprises vary across different types of digital industries. Digital factor-driven and efficiency-enhancing firms prioritize cities with high demand accessibility, whereas digital product and service firms prefer locations with higher supply accessibility. Cities with strong localized economic advantages are capable of attracting various types of digital enterprises. (4) Interregional demand accessibility significantly impacts the location decisions of digital enterprises, while intraregional demand accessibility shows no notable influence. This study enhances the understanding of the locational behavior of digital enterprises and provides valuable insights for other countries. It highlights how, in the context of the rapid development of the digital economy, policy guidance and regional collaboration can optimize the location of digital enterprises and promote the coordinated development of the global digital economy.