How climate impacts organisms depends not only on their physiology, but also whether they can buffer themselves against climate variability via their behaviour. One of the way species can withstand hot temperatures is by seeking out cool microclimates, but only if their habitat provides such refugia. Here, we describe a novel thermoregulatory strategy in an arboreal mammal, the koala Phascolarctos cinereus. During hot weather, koalas enhanced conductive heat loss by seeking out and resting against tree trunks that were substantially cooler than ambient air temperature. Using a biophysical model of heat exchange, we show that this behaviour greatly reduces the amount of heat that must be lost via evaporative cooling, potentially increasing koala survival during extreme heat events. While it has long been known that internal temperatures of trees differ from ambient air temperatures, the relevance of this for arboreal and semi-arboreal mammals has not previously been explored. Our results highlight the important role of tree trunks as aboveground 'heat sinks', providing cool local microenvironments not only for koalas, but also for all tree-dwelling species.