The selection pressure acting along the entire genome sequence of H5N1 avian influenza viruses isolated from several bird species and humans infected in the 1997 and 2004 outbreaks, and on the HA1 genes from H5N1 viruses isolated during the entire study period, in eastern Asia was evaluated. According to maximum-likelihood analysis, viral genes appeared to be, in both epidemics, under strong purifying selection, with only the PB2, HA and NS1 genes under positive selection. Specific codons under positive selection were detected by using codon-based substitution models. Positive-selection analysis performed on single-codon sites might be helpful in clarifying the driving force of avian and human influenza virus evolution and in selecting specific targets for vaccines and antiviral drugs.