Parasite host switches may trigger disease emergence, but prehistoric host ranges are often unknowable. Lymphatic filariasis and loiasis are major human diseases caused by the insect-borne filarial nematodes Brugia, Wuchereria and Loa. Here we show that the genomes of these nematodes and seven tropical bird lineages exclusively share a novel retrotransposon, AviRTE, resulting from horizontal transfer (HT). AviRTE subfamilies exhibit 83–99% nucleotide identity between genomes, and their phylogenetic distribution, paleobiogeography and invasion times suggest that HTs involved filarial nematodes. The HTs between bird and nematode genomes took place in two pantropical waves, >25–22 million years ago (Myr ago) involving the Brugia/Wuchereria lineage and >20–17 Myr ago involving the Loa lineage. Contrary to the expectation from the mammal-dominated host range of filarial nematodes, we hypothesize that these major human pathogens may have independently evolved from bird endoparasites that formerly infected the global breadth of avian biodiversity.