The extremely high species diversity of soil bacterial community has fascinated and puzzled community ecologists. Although theory predicts that fluctuations in environments can facilitate diversity maintenance, the effects of fluctuating temperature on species diversity have rarely been investigated in species-rich microbial communities. Here, we examined whether fluctuating temperature had positive effects on species diversity relative to constant temperatures in soil bacterial communities, and investigated the effects of fluctuating temperature on bacterial performances (changes in relative abundance). We performed a temperature manipulation experiment with soils collected from temperate and subtropical zones, where the soils were subjected to constant high, low or fluctuating temperatures. We found that fluctuating temperatures showed significant positive effects on species diversity. The time-averaged effect of fluctuating temperatures (i.e., averaging out the differences between species in their environment-dependent performances) appeared to delay species loss in both the temperate and the subtropical communities. In addition, we found that the performances of temperature-responsive species at fluctuating temperatures significantly deviated from their time-weighted average performances at constant high and low temperatures, which was defined as fluctuation-dependent effects in our study. Intriguingly, fluctuation-dependent effects beyond time-averaged effect led to an opposite trend: differences in temperature-responsive species' performances decreased in the temperate communities, but increased in the subtropical communities. Our findings provide new insights into diversity maintenance in soil bacterial communities, and imply that the effects of fluctuating temperature on species diversity in soil bacterial community might vary across latitude. © 2023 John Wiley & Sons Ltd.