Although the relationship between temperature level and mortality outcomes has been well established, it is still unknown whether within-day variation in temperature, e.g. diurnal temperature range (DTR), is a risk factor for death independent of the corresponding temperature. Moreover, DTR is a meteorological indicator associated with global climate change which may be related to a variety of health outcomes. We hypothesized that large diurnal temperature change might be a source of additional environmental stress and therefore a risk factor for death. We used daily weather and mortality data from Shanghai, China to test this hypothesis. We conducted a time-series study to examine the association between DTR and mortality outcomes from 2001 to 2004. A semi-parametric generalized additive model (GAM) was used to assess the acute effect of DTR on mortality after controlling for covariates including time trend, day of the week (DOW), temperature, humidity, and outdoor air pollution. We found a strong association between DTR and daily mortality after adjustment for those potential confounders. A 1 degrees C increment of the 3-day moving average of DTR corresponded to a 1.37% (95% CI 1.08-1.65%) increase in total non-accidental mortality, a 1.86% (95% CI 1.40-2.32%) increase in cardiovascular mortality, and a 1.29% (95% CI 0.49-2.09%) increase in respiratory mortality. The effects of DTR on total non-accidental and cardiovascular mortality were significant on both "cold" (below 23 degrees C) and "warm" (at least 23 degrees C) days, although respiratory mortality was only significantly associated with DTR on "cold" days. This study suggests within-day variation in temperature may be a novel risk factor for death.