Topographic heterogeneity causes gradients in altitude, potential solar radiation and soil humidity on a range of scales from micro- to macro-habitat. These gradients are important determinants for the distribution of many organisms but have been largely neglected in studies of species associated with dead wood, a group of great conservation concern. In this study, we evaluated the effects of topography-related gradients (altitude, potential solar radiation and soil humidity) and habitat characteristics (bark cover, ground contact and dead wood volume) on saproxylic (wood-inhabiting) beetle assemblages. We sampled boreal saproxylic beetles hatching from 750 experimentally exposed spruce and birch logs in a regional scale field experiment including 10 landscapes and spanning gradients of altitude (range 85–510masl), potential solar radiation (based on slope and slope aspect and highest in equator-facing slopes, PADIR, range 0.24–0.71) and soil humidity (humidity index, range 2.3–3.1). The logs were placed in north Swedish forests and clear-cuts and beetles were sampled with emergence traps the 4th summer after the logs were introduced. Saproxylic assemblage composition varied considerably in response to altitude, potential solar radiation and soil humidity. The response was evident in both forests and clear-cuts and for both birch and spruce logs. Species density and abundance responses differed among trophic groups. For birch logs, fungivore species density increased significantly with increased potential solar radiation. For spruce logs, altitude affected total species density and density of cambium consumers positively and abundance of fungivores negatively, suggesting a delay in succession due to slower decomposition at higher altitudes. In addition to the topography-related gradients, ground contact and bark cover of logs as well as the availability of dead wood in the vicinity influenced the beetle assemblages. Our results clearly show that topography-related gradients affect assemblage composition of saproxylic beetles. These factors should be considered in the management of saproxylic biodiversity. To ensure the safeguarding of intact saproxylic assemblages it is important that the full range of dead wood habitats is conserved. Topographic heterogeneity may provide opportunities for landscape scale survival in response to rapid climate change but there is also a risk that some niches will disappear. Some of the negative effects of climate change could be mitigated by allocating set asides and restoration efforts in areas where gradient in altitude, solar radiation and soil humidity are particularly well developed over short distances.