Many ectothermic species are currently expanding their distributions polewards due to anthropogenic global warming. Molecular genetic mechanisms facilitating range expansion under these conditions are largely unknown, but understanding these could help mitigate expanding pests and disease vectors, or help explain why some species fail to track changing climates. Here, using RNA-seq data, we examine genome-wide changes in gene expression under heat and cold stress in the range-expanding damselfly Ischnura elegans in northern Europe. We find that both the number of genes involved and levels of gene expression under heat stress have become attenuated during the expansion, consistent with a previously-reported release from selection on heat tolerances as species move polewards. Genes upregulated under cold stress differed between core and edge populations, corroborating previously-reported rapid adaptation to cooler climates at the expansion front. Expression of sixty-nine genes exhibited a region x treatment effect; these were primarily upregulated in response to heat stress in core populations but in response to cold stress at the range edge, suggesting that some cellular responses originally adapted to heat stress may switch to cold stress functionality upon encountering novel thermal selection regimes during range expansion. Transcriptional responses to thermal stress involving heat shock and neural function genes were largely geographically conserved, while retrotransposon, regulatory, muscle function and defence gene expression patterns were more variable. Flexible mechanisms of cold stress response and the ability of some genes to shift their function between heat and cold stress might be key mechanisms facilitating rapid poleward expansion in insects. This article is protected by copyright. All rights reserved.