Haemonchus contortus is a haematophagous parasitic nematode of veterinary interest. We have performed a survey of its genome-wide diversity using single-worm whole genome sequencing of 223 individuals sampled from 19 isolates spanning five continents. We find an African origin for the species, together with evidence for parasites spreading during the transatlantic slave trade and colonisation of Australia. Strong selective sweeps surrounding the β-tubulin locus, a target of benzimidazole anthelmintic drug, are identified in independent populations. These sweeps are further supported by signals of diversifying selection enriched in genes involved in response to drugs and other anthelmintic-associated biological functions. We also identify some candidate genes that may play a role in ivermectin resistance. Finally, genetic signatures of climate-driven adaptation are described, revealing a gene acting as an epigenetic regulator and components of the dauer pathway. These results begin to define genetic adaptation to climate in a parasitic nematode.