While urban form affects building energy consumption, the pathways, direction and magnitude of the effect are disputed in the literature. This paper uses a unique dataset to examine the effect of urban form on residential electricity consumption in Ningbo, China. Using survey and utility bill data of 534 households in 46 neighborhoods in the city, we model the electricity use of households using a multi-level regression model. We find that neighborhood street configuration and tree shade are important in controlling residential electricity consumption and, consequently, greenhouse gas emissions. Our results suggest that seasonality and dwelling type condition the effect of neighborhood densities on electricity consumption. Neighborhood density is associated with household electricity consumption in summer months, while there is no such association in the winter months. As neighborhood density increases, households in slab and tower apartments in dense urban neighborhoods consume more electricity in summer months, which can be partly explained by exacerbated heat island effect. Interestingly, the neighborhood density is negatively associated with electricity consumption for single-family houses, suggesting that the effect of neighborhood density is different for different types of dwelling units.