Marine microbial communities are highly interconnected assemblages of organisms shaped by ecological drift, natural selection, and dispersal. The relative strength of these forces determine show ecosystems respond to environmental gradients, how much diversity is resident in a community or population at any given time, and how populations reorganize and evolve in response to environmental perturbations. In this study, we introduce a globally resolved population–genetic ocean model in order to examine the interplay of dispersal, selection, and adaptive evolution and their effects on community assembly and global biogeography. We find that environmental selection places strong constraints on global dispersal, even in the face of extremely high assumed rates of adaptation. Changing the relative strengths of dispersal, selection, and adaptation has pronounced effects on community assembly in the model and suggests that barriers to dispersal play a key role in the structuring of marine communities, enhancing global biodiversity and the importance of local historical contingencies.