Temperature can fluctuate widely between different seasons, and this may greatly impact many biological processes. However, little is known about its influence on the functioning of benthic microbial communities. Here we investigated the nutrient accumulation capability of periphytic biofilm under temperature fluctuations (17–35°C). Periphytic biofilm maintained the same nutrient accumulation capacity after experiencing the ‘warming-hot-cooling’ temperature fluctuation under both lab and outdoor conditions as those without temperature disturbance. In response to temperature increase, both community composition and species richness changed greatly and the increase in biodiversity was identified as being the underlying mechanism boosting the sustainable function in nutrient accumulation, indicating zero net effects of community changes. These findings provide insights into the underlying mechanisms of how benthic microbial communities adapt to temperature fluctuations to maintain nutrient accumulation capacity and elucidate that periphytic biofilm plays important roles in influencing nutrient cycling in aquatic ecosystems under temperature changes such as seasonal fluctuations.