Climate change affects biodiversity on a global scale due to species extinctions, changes in species distributions and their phenology. However, we do not have a clear understanding how temperature will affect the biodiversity-ecosystem functioning relationship (B-EF). Temperature could affect both the point of saturation and the slope of the B-EF relationship but the effect of species identity, interactions and temperature on B-EF components like complementarity and selection is poorly understood. Here, we report the results of a large-scale microcosm experiment in which species richness and temperature were manipulated to understand changes in community productivity and stability. Richness generally had a positive effect on biomass and stability while warming tended to decrease biomass and destabilize communities. Additive partitioning showed that complementarity had a larger effect than the selection effect and both increased with richness. In contrast, higher temperatures decreased the effect of richness on the complementarity and selection effects (lowering intercept and slope). Model selection showed that temperature dependent species interactions played a significant role in the changing B-EF relationship. All species pairs were negatively affected by temperature regarding net productivity effects. However, some species pairs benefitted from increased temperature in terms of stability, although the overall effect was negative too. Our results highlight that climate change can substantially decrease the function and services that natural ecosystems provide with potentially substantial negative effects for human-well being.