Marine heatwaves threaten the persistence of kelp forests globally. However, the observed responses of kelp forests to these events have been highly variable on local scales. Here, we synthesize distribution data from an environmentally diverse region to examine spatial patterns of canopy kelp persistence through an unprecedented marine heatwave. We show that, although often overlooked, temperature variation occurring at fine spatial scales (i.e., a few kilometers or less) can be a critical driver of kelp forest persistence during these events. Specifically, though kelp forests nearly all persisted toward the cool outer coast, inshore areas were >3 C warmer at the surface and experienced extensive kelp loss. Although temperatures remained cool at depths below the thermocline, kelp persistence in these thermal refugia was strongly constrained by biotic interactions, specifically urchin populations that increased during the heatwave and drove transitions to urchin barrens in deeper rocky habitat. Urchins were, however, largely absent from mixed sand and cobble benthos, leading to an unexpected association between bottom substrate and kelp forest persistence at inshore sites with warm surface waters. Our findings demonstrate both that warm microclimates increase the risk of habitat loss during marine heatwaves and that biotic interactions modified by these events will modulate the capacity of cool microclimates to serve as thermal refugia.