Studies of evolutionary responses to novel environments typically consider single species or perhaps pairs of interacting species. However, all organisms co-occur with many other species, resulting in evolutionary dynamics that might not match those predicted using single species approaches. Recent theories predict that species interactions in diverse systems can influence how component species evolve in response to environmental change. In turn, evolution might have consequences for ecosystem functioning. We used experimental communities of five bacterial species to show that species interactions have a major impact on adaptation to a novel environment in the laboratory. Species in communities diverged in their use of resources compared with the same species in monocultures and evolved to use waste products generated by other species. This generally led to a trade-off between adaptation to the abiotic and biotic components of the environment, such that species evolving in communities had lower growth rates when assayed in the absence of other species. Based on growth assays and on nuclear magnetic resonance (NMR) spectroscopy of resource use, all species evolved more in communities than they did in monocultures. The evolutionary changes had significant repercussions for the functioning of these experimental ecosystems: communities reassembled from isolates that had evolved in polyculture were more productive than those reassembled from isolates that had evolved in monoculture. Our results show that the way in which species adapt to new environments depends critically on the biotic environment of co-occurring species. Moreover, predicting how functioning of complex ecosystems will respond to an environmental change requires knowing how species interactions will evolve.