Environmental contamination is widespread and can negatively impact wildlife health. Some contaminants, including heavy metals, have immunosuppressive effects, but prior studies have rarely measured contamination and disease simultaneously, which limits our understanding of how contaminants and pathogens interact to influence wildlife health. Here, we measured mercury concentrations, influenza infection, influenza antibodies and body condition in 749 individuals from 11 species of wild ducks overwintering in California. We found that the odds of prior influenza infection increased more than fivefold across the observed range of blood mercury concentrations, while accounting for species, age, sex and date. Influenza infection prevalence was also higher in species with higher average mercury concentrations. We detected no relationship between influenza infection and body fat content. This positive relationship between influenza prevalence and mercury concentrations in migratory waterfowl suggests that immunotoxic effects of mercury contamination could promote the spread of avian influenza along migratory flyways, especially if influenza has minimal effects on bird health and mobility. More generally, these results show that the effects of environmental contamination could extend beyond the geographical area of contamination itself by altering the prevalence of infectious diseases in highly mobile hosts.