The degree of urbanisation is rapidly increasing worldwide. Due to anthropogenic impact, urban populations are exposed to higher levels of contaminants and higher temperatures. Despite this, urbanisation is a largely overlooked spatial component in ecotoxicology. We tested in a common garden rearing experiment whether replicated urban and rural populations of the damselfly Coenagrion puella differ in their vulnerability to sublethal levels of a widespread pesticide, chlorpyrifos, in terms of ecologically relevant behaviours (exploration behaviour, activity, boldness and food intake), and to what extent these patterns are affected by temperature (20 and 24 °C). Except boldness, all behaviours were affected by previous pesticide exposure. While the pesticide did not affect exploration behaviour at 20 °C, it was associated with increased exploration at 24 °C, which may reflect an increased toxicity of chlorpyrifos at higher temperatures. Importantly, rural and urban larvae showed consistently different, sometimes even opposite behavioural responses to pesticide exposure. When exposed to the pesticide, rural larvae decreased activity and food intake at both temperatures; urban larvae instead increased activity at both temperatures and only reduced food intake at the high temperature. This suggests that urban larvae were less affected by the pesticide, which would be consistent with a scenario of local adaptation to higher contaminant levels. Our results highlight that urbanisation may be an important factor to arrive at a spatially explicit ecological risk assessment, and may be an ignored reason why studies on the same species may generate widely different vulnerabilities to pesticides.