Though some studies have explored the association between temperature and years of life lost (YLL), limited evidence is available regarding the effect of temporal variation on the temperature-YLL relationship, especially in developing countries. We explored temporal variation in the associations between temperature and YLL before and after 2013 heat waves (period I: Jan 2008 to Sep 2013, period II: Oct 2013 to Dec 2015) in Ningbo, a southern China city with typical subtropical climate. The heat associations showed an increasing trend. The number of YLL due to heat-related respiratory mortality was significantly higher in period II (46.03, 95% CI: 11.97, 80.08) than in period I (7.21, 95% CI: -10.04, 24.46) among married individuals. In contrast, the cold associations presented an attenuating trend, and the number of YLL due to non-accidental mortality was significantly lower in period II (262.32, 95% CI: -304.18, 828.83) than in period I (916.78, 95% CI: 596.05, 1237.51). These results indicate more effort still needed to be made to reduce heat-related YLL even after periods of extreme heat. Furthermore, using YLL provided complementary information for identifying vulnerable subgroups, which has important implications for the planning of public health interventions.