Urban areas consume more than 66% of the world's energy and generate more than 70% of global greenhouse gas (GHG) emissions. With the world's population expected to reach 10 billion by 2100, and with nearly 90% of people living in urban areas, a critical question for planetary sustainability is how the size of cities affects energy use and carbon dioxide (CO2) emissions. Are urban agglomerations more energy and emission efficient than smaller cities? Does urban agglomeration exhibit gains from economies of scale concerning emissions? Here, we examine the relationship between urban agglomeration and CO2 emissions for urban agglomeration in the Yangtze River Delta in China using a STIRPAT (Stochastic Impacts by Regression on Population, Affluence and Technology) model considering the spatial effects. Also, it examines the influence of economic development, industrial structure, opening-up level, and technology progress on carbon emissions by exploring the spatial agglomeration and spillover effects. Our major finding is that urban size has a negative correlation to carbon emissions, demonstrating that urban agglomeration is more emission efficient. In addition, our results showed that carbon emission driving factors, such as technology progress, opening-up, and population, have spatial dependence and spatial spillover effects. It means a city's carbon emissions are not only influenced by its own factors but also have an impact on neighboring cities. Therefore, cross-city or urban agglomeration policy, and actions of reducing carbon emissions, are necessary, whilst also developing a low-carbon economy by increasing the proportion of high-tech industry through technological progress and developing vigorous resource-saving and an environmentally friendly tertiary industry.