Habitat destruction is a growing threat to biodiversity and ecosystem services. The ecological consequences of habitat loss and fragmentation involve reductions in species abundance and even the extinction of species and interactions. However, we do not yet understand how habitat loss can alter the coevolutionary trajectories of the remaining species or how coevolution, in turn, affects their response to habitat loss. To investigate this, we develop a spatially explicit model which couples metacommunity and coevolutionary dynamics. We show that, by changing the size, composition and structure of local networks, habitat destruction increases the diversity of coevolutionary outcomes across the landscape. Furthermore, we show that while coevolution dampens the negative effects of habitat destruction in mutualistic networks, its effects on the persistence of antagonistic communities are less predictable.