Ecological speciation occurs when local adaptation generates reproductive isolation as a by-product of natural selection. Although ecological speciation is a fundamental source of diversification, the mechanistic link between natural selection and reproductive isolation remains poorly understood, especially in natural populations. Here, we show that experimental evolution of parasite body size over 4 y (approximately 60 generations) leads to reproductive isolation in natural populations of feather lice on birds. When lice are transferred to pigeons of different sizes, they rapidly evolve differences in body size that are correlated with host size. These differences in size trigger mechanical mating isolation between lice that are locally adapted to the different sized hosts. Size differences among lice also influence the outcome of competition between males for access to females. Thus, body size directly mediates reproductive isolation through its influence on both intersexual compatibility and intrasexual competition. Our results confirm that divergent natural selection acting on a single phenotypic trait can cause reproductive isolation to emerge from a single natural population in real time.