Extreme heat events will become more frequent under anthropogenic climate change, especially in Mediterranean ecosystems. Microhabitats can considerably moderate (buffer) the effects of extreme weather events and hence facilitate the persistence of some components of the biodiversity. We investigate the microclimatic moderation provided by two important microhabitats (cavities formed by the leaves of the grass-tree Xanthorrhoea semiplana F.Muell., Xanthorrhoeaceae; and inside the leaf-litter) during the summer of 2015/16 on the Fleurieu Peninsula of South Australia. We placed microsensors inside and outside these microhabitats, as well as above the ground below the forest canopy. Grass-tree and leaf-litter microhabitats significantly buffered against high temperatures and low relative humidity, compared to ground-below-canopy sensors. There was no significant difference between grass-tree and leaf-litter temperatures: in both microhabitats, daily temperature variation was reduced, day temperatures were 1–5°C cooler, night temperatures were 0.5–3°C warmer, and maximum temperatures were up to 14.4°C lower, compared to ground-below-canopy sensors. Grass-tree and leaf-litter microhabitats moderated heat increase at an average rate of 0.24°C temperature per 1°C increase of ambient temperature in the ground-below-canopy microhabitat. The average daily variation in temperature was determined by the type (grass-tree and leaf-litter versus ground-below-canopy) of microhabitat (explaining 67%), the amount of canopy cover and the area of the vegetation fragment (together explaining almost 10% of the variation). Greater canopy cover increased the amount of microclimatic moderation provided, especially in the leaf-litter. Our study highlights the importance of microhabitats in moderating macroclimatic conditions. However, this moderating effect is currently not considered in species distribution modelling under anthropogenic climate change nor in the management of vegetation. This shortcoming will have to be addressed to obtain realistic forecasts of future species distributions and to achieve effective management of biodiversity.