Biodiversity drives ecosystem processes but its influence on deadwood decomposition is poorly understood. To test effects of insect diversity on wood decomposition, we conducted a mesocosm experiment manipulating species richness and functional diversity of beetles. We applied a novel approach using computed tomography scanning to quantify decomposition by insects and recorded fungal and bacterial communities. Decomposition rates increased with both species richness and functional diversity of beetles, but the effects of functional diversity were linked to beetle biomass, particularly to the presence of one large‐bodied species. This suggests that mechanisms behind observed biodiversity effects are the selection effect, which is linked to the occurrence probability of large species, and the complementarity effect, which is driven by functional differentiation among species. Additionally, beetles had significant indirect effects on wood decomposition via bacterial diversity, fungal community composition and fungal biomass. Our experiment shows that wood decomposition is driven by beetle diversity and its interactions with bacteria and fungi. This highlights that both insect and microbial biodiversity are critical to maintain ecosystem functioning.