Demographic and evolutionary dynamics in wild metapopulations are critically affected by the balance between dispersal and local adaptation. Where populations are demographically interconnected by migration, gene flow is often assumed to prevent local adaptation. However, reduced fitness of immigrants may limit gene flow between populations adapted to distinct habitat types, although direct quantification of the lifetime reproductive success of immigrants in the wild is lacking. Here, we show that dispersers between stream-spawning populations of sockeye salmon (Oncorhynchus nerka) had similar reproductive success to those that spawned in their natal stream, whereas dispersers from a different habitat (nearby lake beaches) produced half as many offspring. The stream- and beach-spawning ecotypes exhibited striking morphological differences despite their close spatial proximity, yet dispersal from the beach to the streams was more common than dispersal between streams, presenting empirical evidence that variation in immigrant reproductive success is important for the maintenance of intraspecific biodiversity.