Marine heatwaves are triggering coral bleaching events and devastating coral populations globally, highlighting the need to identify processes promoting coral survival. Here, we show that acceleration of a major ocean current and shallowing of the surface mixed layer enhanced localized upwelling on a central Pacific coral reef during the three strongest El Niño–associated marine heatwaves of the past half century. These conditions mitigated regional declines in primary production and bolstered local supply of nutritional resources to corals during a bleaching event. The reefs subsequently suffered limited post-bleaching coral mortality. Our results reveal how large-scale ocean-climate interactions affect reef ecosystems thousands of kilometers away and provide a valuable framework for identifying reefs that may benefit from such biophysical linkages during future bleaching events.