Highly pathogenic avian influenza (HPAI) H5 viruses have circulated globally causing incidental human infection with a substantial pandemic threat. The present study investigated the molecular evolution and phylodynamics of hemagglutinin (HA) in avian and human-isolated H5Nx viruses globally circulating since 2000. We investigated the dynamics of amino acid substitution in the HA sequences of avian and human H5Nx viruses and performed a phylogenetic analysis. Our study found that the H5Nx lineages dominantly expanded since 2000 and diverged into multiple sublineages with unique genetic mutations. P185S mutation in HA became a molecular characteristic of dominant H5Nx viruses throughout clades 2.3.4.1 to 2.3.4.4 (2.3.4.1–4). The key mutations, ΔE130 and I155T, and potential N-linked glycosylation at residues 128, 144, and 159 in the HA gene of human-isolated viruses possibly contributed to both the individual and population levels of the H5 evolution and the host adaptation. Our analysis detected heterogeneity in amino acid sites under positive selection in the HA gene of clades 2.3.4.1–4. Accumulated mutations in the HA protein may potentially affect not only the genetic and antigenic diversity of HPAI H5Nx viruses but also increase the functional compatibility with NA subtypes. Given the global spread and incessantly occurring HA mutations of H5Nx viruses, our results emphasize the importance of early identification of HA mutations as well as the need for a comprehensive assessment of H5Nx variants in terms of pandemic preparedness.