Female mosquitoes are major vectors of human disease and the most dangerous are those that preferentially bite humans. A ‘domestic’ form of the mosquito Aedes aegypti has evolved to specialize in biting humans and is the major worldwide vector of dengue, yellow fever, and Chikungunya viruses. The domestic form coexists with an ancestral, animal-biting ‘forest’ form along the coast of Kenya. We collected the two forms, established laboratory colonies, and document striking divergence in preference for human versus animal odour. We further show that the evolution of preference for human odour in domestic mosquitoes is tightly linked to increases in the expression and ligand-sensitivity of the odorant receptor AaegOr4, which we found recognises a compound present at high levels in human odour. Our results provide a rare example of a gene contributing to behavioural evolution and provide insight into how disease-vectoring mosquitoes came to specialise on humans.