Microbial diversity is generally considered as having no effect on the major processes of the ecosystem such as respiration or nutrient assimilation. However, information about the impact of diversity on minor functions such as xenobiotic degradation is scant. We studied the role of diversity on the capacity of an activated‐sludge microbial community to eliminate phenanthrene, a polycyclic aromatic hydrocarbon. We also assessed the impact of diversity erosion on the ability of activated sludge to oxidize a wide range of organic compounds. The diversity of activated sludge was artificially modified by dilution to extinction followed by regrowth stage which led to communities with similar biomass but displaying a diversity gradient. The capacity of activated‐sludge community to degrade phenanthrene was greatly modified: at high levels of diversity, the community was able to mineralize phenanthrene whereas at medium levels it first of all partially lost its ability to mineralize this pollutant and at the lowest diversity, the activated sludge completely lost its capacity to transform phenanthrene. Diversity depletion also reduced the metabolic diversity and biomass productivity of sewage‐activated sludge. This study demonstrates that diversity erosion can greatly affect major ecosystem services such as pollutant removal.