Whether sexual selection facilitates or hampers the ability to plastically respond to novel environments might depend on population structure, via its effects on sexual interactions and associated fitness payoffs. Using experimentally evolved lines of the seed beetle Callosobruchus maculatus, we tested whether individuals evolving under different sexual selection (monogamy vs. polygamy) and population spatial structure (metapopulation vs. undivided populations) treatments differed in their response across developmental thermal conditions (control, hot, or stressful) in a range of fitness and fitness-associated traits. We found that individuals from subdivided populations had lower lifetime reproductive success at hot temperatures, but only in lines evolving under relaxed sexual selection, revealing a complex interaction between sexual selection, population structure, and thermal environmental stress on fitness. We also found an effect of population structure on several traits, including fertility and adult emergence success, under exposure to high thermal conditions. Finally, we found a strong negative effect of hot and stressful temperatures on fitness and associated traits. Our results show that population structure can exacerbate the impact of a warming climate, potentially leading to declines in population viability, but that sexual selection can buffer the negative influence of population subdivision on adaptation to warm temperatures.