Theory and evidence from developed economies suggests that innovation activities benefit from agglomeration economies associated with urban economic density. However, despite the fact that eighteen of the world’s top twenty cities are in developing countries, we do not know whether agglomeration affects innovation in the same way in developing countries. We propose that, while there are still agglomeration benefits, the development path followed by cities in developing countries also creates significant agglomeration costs and these act to limit innovation. We build a unique database to measure consistently both urban economic density and innovation across a large number of developing countries. Based on geospatial information, we combine data on nightlights at the city level to proxy urban density with information on innovation activity at the firm level. We find that in developing countries, as urban economic density increases, innovation first increases and then begins to decrease beyond a certain point, with the decline being most prominent in the largest cities. That is, the largest cities in developing countries are not able to act as sustainable sources of innovation. Cities in developing countries therefore display different patterns of agglomeration from those documented in the literature focused on developed countries. Our analysis explores the relationship between UN Sustainable Development Goal (SDG) 9 which fosters innovation, and SDG 11 which promotes sustainable and resilient cities. Our results suggest the importance of addressing urban agglomeration costs as a means to facilitate innovative activity.