Context Freshwater primary productivity is threatened by the decline in biodiversity associated with nutrient enrichment, but there is still uncertainty about how the biodiversity and productivity relationship (BPR) varies with the trophic states. Aims We aimed to examine the variation of benthic diatom BPRs in three plateau lakes with different trophic states and their underlying driving mechanisms. Methods We examined the relationship between diatom taxonomic and functional diversity, niche width, and niche overlap with productivity. Key results The taxonomic and functional diversity, niche width and productivity of benthic diatoms were highest in the mesotrophic lake. The benthic diatom BPRs were linear and positive, with the slope of BPRs being the lowest in eutrophic lake. Motile, non-attached and small-sized diatoms were dominant in eutrophic lake. Nutrient concentrations indirectly affected primary productivity by influencing algal community structure, niche width and biodiversity change. Conclusions Diatom productivity and diversity showed a positive relationship, but nutrient enrichment weakened this relationship. By combining taxonomic and functional diversity indices, supplemented by niche analysis, we can further understand the variation of diatom productivity. Implications The results provide a basis for predicting the changes in BPRs of benthic diatoms in the littoral zone with different trophic states.