1. Retention forestry, in which trees and tree patches are set aside at harvest to promote biodiversity, has been proven to have positive effects on biodiversity at the stand-level across different taxa. However, the effectiveness of retention approaches with regard to landscape composition remains unexplored. 2. We linked the effect sizes from two meta-analyses (31 case studies and 1050 comparisons from boreal and temperate regions), which quantified the effectiveness of biodiversity conservation as a result of retention practices, with the stand property of retention level (the percentage of trees retained after logging) and with Landsat-retrieved landscape data on forest cover and spatial configurations at three spatial scales (1, 3, and 5 km radii). 3. We found that, in addition to the fundamental importance of tree retention as a local-scale implementation for conservation, landscape properties were important in models to predict biodiversity responses. The effect sizes for species richness decreased with increasing patch contiguity within the landscapes at all spatial scales. Similar results were observed for abundance responses at the largest spatial scale. These results suggest that biodiversity responses to tree retention may be weaker in less fragmented landscapes, which is in agreement with theoretical and empirical findings from agricultural landscapes ('the intermediate landscape-complexity hypothesis'). 4. The benefits of retention levels within a stand (percentage of trees retained) varied amongst species with different habitat requirements (forest-dependent, open habitat, and generalist species). Whilst this stand-level property was often an important determinant of biodiversity responses, models that included landscape properties as explanatory variables always performed better than those that were only based on the retention levels for all species groups. Thus, within-stand habitat conditions and landscape configurations likely have synergetic influences on biodiversity responses. 5. Synthesis and applications. In addition to the importance of stand-level properties, such as the action of retention harvesting itself and the number of trees retained, conditions in the surrounding landscape can simultaneously affect biodiversity in stands that are managed under retention forestry. Our study suggests that retention patches are particularly important in moderately fragmented landscapes. Retention practices could be less important in previously unlogged and less fragmented landscapes, where setting aside large reserves is a conservation priority. For highly fragmented landscapes, different actions of forest restoration, which are not limited to set-aside actions during logging, would be important. Our study emphasizes that carefully planned conservation schemes with a large-scale perspective, as well as local-scale actions, such as retention forestry, are critical for effective forest management and conservation planning.