Deadwood heterogeneity is regarded as a primary causal driver of deadwood-associated soil biodiversity, but the underlying mechanisms remain elusive. This is partly due to the technical difficulties in disentangling and quantifying different components (e.g., deadwood is both habitat and food) of heterogeneity to which soil organisms may have context-dependent responses. Furthermore, non-trophic interactions, e.g., facilitation, also add complexity to deadwood heterogeneity-biodiversity relationships, yet their influences are unaccounted for in most deadwood biodiversity studies. To address these research gaps, we sampled isopod communities from 40 logs of two isotopically distinct tree species, which had been cut and incubated reciprocally for eight years in each of two environmentally contrasting sites (e.g., differences in background isotopic signatures and litter turnover rates). We then assessed the extent to which the variation in the biodiversity of isopod communities is explained by deadwood heterogeneity induced by wood-boring beetles. Stable isotope ratios (i.e., δ13C and δ15N) were employed to examine the response of trophic diversity of isopod communities to the rarely tested food facet of deadwood heterogeneity. We hypothesized the deadwood heterogeneity is boosted by wood-boring beetles and thereby positively affects the abundance, taxonomic diversity and trophic diversity of isopod communities. Our results supported this hypothesis: the abundance and Shannon and Simpson diversity as well as trophic diversity of isopods were positively correlated to wood-boring beetle tunnel densities in both sites and across the two tree species. We observed significant tree species and reciprocal treatment effects on the δ15N values of isopods in one of the two sites. This result suggested that the use of deadwood as food sources versus habitats by isopods is environmentally dependent. This study demonstrates that there is substantial heterogeneity within deadwood that promotes the diversity and trophic diversity of macroinvertebrates. This relationship is mediated by saproxylic beetle facilitation, with implications for the roles of saproxylic beetles and within-deadwood heterogeneity in determining microbial wood decomposition in temperate forests.