Increasing ocean temperatures threaten coral reefs globally, but corals residing in habitats that experience high thermal variability are thought to be better adapted to survive climate-induced heat stress. Here, we used long-term ecological observations and in situ temperature data from Heron Island, southern Great Barrier Reef to investigate how temperature dynamics within various thermally variable vs. thermally stable reef habitats change during a marine heatwave and the resulting consequences for coral community survival. During the heatwave, thermally variable habitats experienced larger surges in daily mean and maxima temperatures compared to stable sites, including extreme hourly incursions up to 36.5 °C. The disproportionate increase in heat stress in variable habitats corresponded with greater subsequent declines in hard coral cover, including a three-times greater decline within the thermally variable Reef Flat (70%) and Deep Lagoon (83%) than within thermally stable habitats along sheltered and exposed areas of the reef slope (0.3–19%). Interestingly, the thermally variable Reef Crest experienced comparatively small declines (26%), avoiding the most severe tidal ponding and resultant heat stress likely due to proximity to the open ocean equating to lower seawater residence times, greater mixing, and/or increased flow. These results highlight that variable thermal regimes, and any acclimatization or adaptation to elevated temperatures that may lead to, do not necessarily equate to protection against bleaching and mortality during marine heatwaves. Instead, thermally stable habitats that have greater seawater exchange with the open ocean may offer the most protection to corals during the severe marine heatwaves that accompany a changing climate.