Ecological and evolutionary processes influence community assembly at both local and regional scales. Adding a phylogenetic dimension to studies of species turnover allows tests of the extent to which environmental gradients, geographic distance and the historical biogeography of lineages have influenced speciation and dispersal of species throughout a region. We compare measures of beta diversity, phylogenetic community structure and phylobetadiversity (phylogenetic distance among communities) in 34 plots of Amazonian trees across white-sand and clay terra firme forests in a 60 000 square kilometer area in Loreto, Peru. Dominant taxa in white-sand forests were phylogenetically clustered, consistent with environmental filtering of conserved traits. Phylobetadiversity measures found significant phylogenetic clustering between terra firme communities separated by geographic distances of <200–300 km, consistent within recent local speciation at the watershed scale in the Miocene-aged clay-soil forests near the foothills of the Andes. Although both distance and habitat type yielded statistically significant effects on both species and phylogenetic turnover, the patterns we observed were more consistent with an effect of habitat specialization than dispersal limitation. Our results suggest a role for both broad-scale biogeographic and evolutionary processes, as well as habitat specialization, influencing community structure in Amazonian forests.