Many species are more restricted in their habitat associations at the leading-edges of their range margins, but some species have broadened their habitat associations in these regions during recent climate change. We examine the effects of multiple, interacting climatic variables on spatial and temporal patterns of species’ habitat associations, using the speckled wood butterfly, Pararge aegeria, in Britain, as our model taxon. Our analyses reveal that this species, traditionally regarded as a woodland-dependent insect, is less restricted to woodland in regions with warmer winters and warmer and wetter summers. In addition, over the past 40 years of climate change the species has become less restricted to woodland in locations where temperature and summer rainfall have increased most. We show that these patterns arise mechanistically because larval growth rates are slower in open (i.e. non-woodland) habitats associated with colder microclimates in winter and greater host plant desiccation in summer. We conclude that macro- and micro-climatic interactions drive variation in species’ habitat associations, which for our study species resulted predominantly in a widening of habitat associations under climate change. However, species vary in their climatic and non-climatic requirements, and so complex spatial and temporal patterns of changes in habitat associations are likely to be observed in future as the climate changes.