The carbon intensity of economic activity, or CO2 emissions per unit GDP, is a key indicator of the climate impacts of a given activity, business, or region. Although it is well-known that the carbon intensity of countries varies widely according to their level of economic development and dominant industries, few studies have assessed disparities in carbon intensity at the level of cities due to limited availability of data. Here, we present a detailed new inventory of emissions for 337 Chinese cities (every city in mainland China including 333 prefecture-level divisions and 4 province-level cities, Beijing, Tianjin, Shanghai, and Chongqing) in 2013, which we use to evaluate differences of carbon intensity between cities and the causes of those differences. We find that cities' average carbon intensity is 0.84 kg of CO2 per dollar of gross domestic product (kgCO2 per $GDP), but individual cities span a large range: from 0.09 to 7.86 kgCO2 per $GDP (coefficient of variation of 25%). Further analysis of economic and technological drivers of variations in cities' carbon intensity reveals that the differences are largely due to disparities in cities' economic structure that can in turn be traced to past investment-led growth. These patterns suggest that "carbon lock-in" via socio-economic and infrastructural inertia may slow China's efforts to reduce emissions from activities in urban areas. Policy instruments targeted to accelerate the transition of urban economies from investment-led to consumption-led growth may thus be crucial to China meeting both its economic and climate targets.