The emergence of human infection with a novel H7N9 influenza virus in China raises a pandemic concern. Chicken H9N2 viruses provided all six of the novel reassortant´s internal genes. However, it is not fully understood how the prevalence and evolution of these H9N2 chicken viruses facilitated the genesis of the novel H7N9 viruses. Here we show that over more than 10 y of cocirculation of multiple H9N2 genotypes, a genotype (G57) emerged that had changed antigenicity and improved adaptability in chickens. It became predominant in vaccinated farm chickens in China, caused widespread outbreaks in 2010-2013 before the H7N9 viruses emerged in humans, and finally provided all of their internal genes to the novel H7N9 viruses. The prevalence and variation of H9N2 influenza virus in farmed poultry could provide an important early warning of the emergence of novel reassortants with pandemic potential