Ecological interactions have been acknowledged to play a key role in shaping biodiversity1,2. Yet a major challenge for evolutionary biology is to understand the role of ecological interactions in shaping trait evolution when progressing from pairs of interacting species to multispecies interaction networks2. Here we introduce an approach that integrates coevolutionary dynamics and network structure. Our results show that non-interacting species can be as important as directly interacting species in shaping coevolution within mutualistic assemblages. The contribution of indirect effects differs among types of mutualism. Indirect effects are more likely to predominate in nested, species-rich networks formed by multiple-partner mutualisms, such as pollination or seed dispersal by animals, than in small and modular networks formed by intimate mutualisms, such as those between host plants and their protective ants. Coevolutionary pathways of indirect effects favour ongoing trait evolution by promoting slow but continuous reorganization of the adaptive landscape of mutualistic partners under changing environments. Our results show that coevolution can be a major process shaping species traits throughout ecological networks. These findings expand our understanding of how evolution driven by interactions occurs through the interplay of selection pressures moving along multiple direct and indirect pathways.