Climate change is radically altering the frequency, intensity and spatial scale of severe weather events, such as heatwaves, droughts, floods and fires1. As the time interval shrinks between recurrent shocks2,3,4,5, the responses of ecosystems to each new disturbance are increasingly likely to be contingent on the history of other recent extreme events. Ecological memory—defined as the ability of the past to influence the present trajectory of ecosystems6,7—is also critically important for understanding how species assemblages are responding to rapid changes in disturbance regimes due to anthropogenic climate change2,3,6,7,8. Here, we show the emergence of ecological memory during unprecedented back-to-back mass bleaching of corals along the 2,300 km length of the Great Barrier Reef in 2016, and again in 2017, whereby the impacts of the second severe heatwave, and its geographic footprint, were contingent on the first. Our results underscore the need to understand the strengthening interactions among sequences of climate-driven events, and highlight the accelerating and cumulative impacts of novel disturbance regimes on vulnerable ecosystems.