Shading is the most critical process in tree cooling. Although the influence of tree features on shade supply has been extensively studied, the efficiency of shade performance in diverse environments remains poorly understood. The latter is crucial, as urban areas are highly heterogeneous, and local microclimates and land cover heterogeneity are among the most perceptible and observable aspects. We randomly selected several typical tree patches in Beijing to explore whether and how tree-shade efficiency varies with these factors. We used temporal variations as a proxy to study the impact of microclimatic heterogeneity on tree shade efficiency by comparing sunny and cloudy conditions, as well as different times of the day. In addition, we investigated the differences in shading efficiency over various surfaces by comparing pairs of regular urban surfaces (asphalt, concrete, permeable brick, and grass). We found that tree shade significantly improved the local thermal environment, but its effectiveness varied with the environmental conditions. Tree shading resulted in a higher cooling efficiency under greater external thermal stress. In addition, the cooling efficiency was greater on surfaces with higher temperatures. We also identified a notable characteristic of tree shading for cooling: the thermal environment beneath the tree shade tends to stabilize at a relatively constant value across various external conditions. These results provide practical guidelines for optimizing tree layouts in highly heterogeneous urban environments and enhancing limited tree resources for more effective and economical improvement of urban thermal conditions.