1. Although metacommunity models generally formulate dispersal as a random, passive process, mounting evidence suggests that dispersal can be an active process depending on species fitness over the landscape, particularly in multitrophic communities. How different dispersal modes (i.e. from random to increasingly fitnessdependent dispersal) modulate the effect of dispersal on biodiversity remains unclear. Here, we used a metacommunity model of food webs to investigate the effects of dispersal and habitat heterogeneity on biodiversity and how these effects may be dependent on dispersal mode. 2. Our results showed that compared to isolated systems, random dispersal increased local food web diversity (α diversity) but decreased across-community dissimilarity (β diversity) and regional food web diversity (γ diversity), consistent with findings from competitive metacommunity models. However, fitnessdependency could alter the effects of dispersal on biodiversity. Both β and γ diversity increased with the strength of fitness-dependency of dispersal, while α diversity peaked at intermediate fitness-dependency. Notably, strong fitnessdependent dispersal maintained levels of β and γ diversity similar to those observed in isolated systems. Thus, random dispersal and isolation (i.e. no dispersal) can be considered as two extremes along the continuum of fitness-dependent dispersal, in terms of their effects on biodiversity.3. Moreover, both biodiversity-habitat heterogeneity and biodiversity-habitat connectivity relationships depended on the dispersal mode. Strikingly, under random dispersal, γ diversity decreased with habitat heterogeneity and connectivity, but under strong fitness-dependent dispersal, it increased with habitat heterogeneity and remained unchanged as habitat connectivity increased. 4. Our study highlights the context dependence of dispersal effects on biodiversity in heterogeneous landscapes. Our findings have useful implications for biodiversity conservation and landscape management, where management strategies should account for different modes of dispersal across taxa, thus different responses of biodiversity to habitat heterogeneity and connectivity.