Coevolution between interacting species is thought to increase biodiversity, but evidence linking microevolutionary processes to macroevolutionary patterns is scarce. We leveraged two decades of behavioral research coupled with historical DNA analysis to reveal that coevolution with hosts underpins speciation in brood-parasitic bronze-cuckoos. At a macroevolutionary scale, we show that highly virulent brood-parasitic taxa have higher speciation rates and are more likely to speciate in sympatry than less-virulent and nonparasitic relatives. We reveal the microevolutionary process underlying speciation: Hosts reject cuckoo nestlings, which selects for mimetic cuckoo nestling morphology. Where cuckoos exploit multiple hosts, selection for mimicry drives genetic and phenotypic divergence corresponding to host preference, even in sympatry. Our work elucidates perhaps the most common, but poorly characterized, evolutionary process driving biological diversification.