Hypoxia is a key factor determining survival, and haemoglobins are targets of selection in species native to high-altitude regions. We studied population genetic structure and evaluated evidence for local adaptation in the crested duck (Lophonetta specularioides). Differentiation, gene flow and time since divergence between highland and lowland populations were assessed for three haemoglobin genes (αA, αD, βA) and compared to seven reference loci (six autosomal introns and mtDNA). Four derived amino acid replacements were found in the globin genes that had elevated ΦST values between the Andean highlands and Patagonian lowlands. A single βA-globin polymorphism at a site known to influence O2 affinity was fixed for different alleles in the two populations, whereas three αA- and αD-globin polymorphisms exhibited high heterozygosity in the highlands but not in the lowlands. Coalescent analyses supported restricted gene flow for haemoglobin alleles and mitochondrial DNA but nonzero gene flow for the introns. Simulating genetic data under a drift–migration model of selective neutrality, the βA-globin fell outside the 95% confidence limit of simulated data, suggesting that directional selection is maintaining different variants in the contrasting elevational environments, thereby restricting migration of βA-globin alleles. The αA- and αD-globins, by contrast, did not differ from the simulated values, suggesting that variants in these genes are either selectively neutral, or that the effects of selection could not be differentiated from background levels of population structure and linkage disequilibrium. This study illustrates the combined effects of selection and population history on inferring levels of population divergence for a species distributed across an altitudinal gradient in which selection for hypoxia resistance has likely played an important role.