Aim: Biogenic structural complexity increases mobile animal richness and abundance at local, regional and global scales, yet animal taxa vary in their response to complexity. When these taxa also vary functionally, habitat structures favouring certain taxa may have consequences for ecosystem function. We characterised global patterns of epifaunal invertebrates in eelgrass (Zostera marina) beds that varied in structural and genetic composition. Location: North America, Europe and Asia. Time Period: 2014. Major Taxa Studied: Peracarid crustaceans and gastropod molluscs. Methods: We sampled epifaunal invertebrate communities in 49 eelgrass beds across 37° latitude in two ocean basins concurrently with measurements of eelgrass genetic diversity, structural complexity and other abiotic and biotic environmental variables. We examined how species richness, abundance and community composition varied with latitude and environmental predictors using a random forest approach. We also examined how functional trait composition varied along with community structure. Results: Total species richness decreased with latitude, but this was accompanied by a taxonomic shift in dominance from peracarid crustaceans to gastropods, which exhibited different sets of functional traits. Greater eelgrass genetic diversity was strongly correlated with both richness and abundance of peracarids, but less so for gastropods. Main Conclusions: Our results add to a growing body of literature that suggests genetic variation in plant traits influences their associated faunal assemblages via habitat structure. Because peracarids and gastropods exhibited distinct functional traits, our results suggest a tentative indirect link between broad-scale variation in plant genetic diversity and ecosystem function. © 2024 The Author(s). Global Ecology and Biogeography published by John Wiley & Sons Ltd.