The consequences of climate change for biogeographic range dynamics depend on the spatial scales at which climate influences focal species directly and indirectly via biotic interactions. An overlooked question concerns the extent to which microclimates modify specialist biotic interactions, with emergent properties for communities and range dynamics. Here, we use an in-field experiment to assess egg-laying behaviour of a range-expanding herbivore across a range of natural microclimatic conditions. We show that variation in microclimate, resource condition and individual fecundity can generate differences in egg-laying rates of almost two orders of magnitude in an exemplar species, the brown argus butterfly (
Aricia agestis
). This within-site variation in fecundity dwarfs variation resulting from differences in average ambient temperatures among populations. Although higher temperatures did not reduce female selection for host plants in good condition, the thermal sensitivities of egg-laying behaviours have the potential to accelerate climate-driven range expansion by increasing egg-laying encounters with novel hosts in increasingly suitable microclimates. Understanding the sensitivity of specialist biotic interactions to microclimatic variation is, therefore, critical to predict the outcomes of climate change across species' geographical ranges, and the resilience of ecological communities.