Biodiversity–ecosystem functioning experiments typically inspect functioning in randomly composed communities, representing broad gradients of taxonomic richness. We tested if the resulting evenness gradients and evenness–functioning relationships reflect those found in communities facing evenness loss caused by anthropogenic stressors. To this end, we exposed marine benthic diatom communities to a series of treatments with the herbicide atrazine, and analysed the relationship between the resulting gradients of evenness and ecosystem functioning (primary production, energy content and sediment stabilization). Atrazine exposure resulted in narrower evenness gradients and steeper evenness–functioning relations than produced by the design of random community assembly. The disproportionately large decrease in functioning following atrazine treatment was related to selective atrazine effects on the species that contributed most to the ecosystem functions considered. Our findings demonstrate that the sensitivity to stress and the contribution to ecosystem functioning at the species level should be both considered to understand biodiversity and ecosystem functioning under anthropogenic stress.