The downward trend in Arctic sea ice extent is one of the most dramatic signals of climate change during recent decades. Comprehensive climate models have struggled to reproduce this trend, typically simulating a slower rate of sea ice retreat than has been observed. However, this bias has been widely noted to have decreased in models participating in phase 5 of the Coupled Model Intercomparison Project (CMIP5) compared with the previous generation of models (CMIP3). Here simulations are examined from both CMIP3 and CMIP5. It is found that simulated historical sea ice trends are influenced by volcanic forcing, which was included in all of the CMIP5 models but in only about half of the CMIP3 models. The volcanic forcing causes temporary simulated cooling in the 1980s and 1990s, which contributes to raising the simulated 1979-2013 global-mean surface temperature trends to values substantially larger than observed. It is shown that this warming bias is accompanied by an enhanced rate of Arctic sea ice retreat and hence a simulated sea ice trend that is closer to the observed value, which is consistent with previous findings of an approximately linear relationship between sea ice extent and global-mean surface temperature. Both generations of climate models are found to simulate Arctic sea ice that is substantially less sensitive to global warming than has been observed. The results imply that much of the difference in Arctic sea ice trends between CMIP3 and CMIP5 occurred because of the inclusion of volcanic forcing, rather than improved sea ice physics or model resolution.