Similarity in community composition declines as distance between locations increases, a phenomenon that has been observed in a wide variety of freshwater, marine and terrestrial ecosystems. One driver of the distance-similarity relationship is the presence of environmental gradients that alter the suitability of sites for particular species. Although some environmental gradients, such as geology, do not change on a year-to-year basis, others, such as temperature, vary annually and over longer time periods. Here, we used a 21-year dataset of fish communities in the upper Mississippi River to identify the effect of distance on variation in community composition and to assess whether the effect of distance is primarily due to its effect on thermal regime. Because the Mississippi River is aligned mostly north-to-south, larger distances along the river roughly correspond to larger differences in latitude and therefore temperature. As expected, there was a moderate distance-similarity relationship, suggesting greater distance leads to less similarity. The effect of distance appeared to increase slightly over time. Using a subset of data for which air temperature was available, we found that difference among sites in degree days (a surrogate for thermal regime) was more strongly associated with similarity in community composition than physical distance (river km). Although physical distance presumably incorporates more environmental gradients than just temperature (and other potential mechanisms), temperature alone appears to be more strongly associated with differences in the Mississippi River fish community.