According to metacommunity theory and previous experiments, inter-patch dispersal rates may alter species diversity at local to regional scales. In this study, we tested the predictions of metacommunity theory regarding the effect of dispersal rates on diversity, with a focus on the impact of environmental heterogeneity. Experiments were conducted in which the dispersal frequencies of freshwater nematode communities and the heterogeneity of local environmental conditions were factorial manipulated by maintaining mesocosms under homogeneous or heterogeneous temperature regime. The effect on biodiversity of the dispersal rate, environmental heterogeneity, and the interaction thereof were evaluated using linear (mixed) models, which showed a significant interaction of the dispersal rate and environmental heterogeneity for alpha- and gamma-diversity measures. Specifically, in homogeneous environments an increase in the dispersal rates led to a decline in diversity at local and regional scales. This was due to the increasing dominance of Daptonema dubium, which was favored by a higher patch connectivity that allowed it to invade local communities. In heterogeneous environments, diversity was unaffected, suggesting that rescue and source-sink effects did not play a role for many species, probably due to the wide temperature range. Diversity was also not impacted by high and low dispersal treatments, and the maximum change was already reached at a dispersal rate of <7% in 4 weeks. The communities were then sampled a second time to investigate the development of diversity when dispersal and thus community connectivity are suspended. After only 12 weeks of isolation, the homogenizing effect of dispersal on community disappeared. The results point to the degree of environmental heterogeneity as key factor in the metacommunity framework. They also demonstrate the need to increase experimental complexity in order to facilitate comparisons between experiments.