Avian influenza (AI) has severely affected the poultry industry worldwide and has caused the deaths of millions of birds. Highly pathogenic avian influenza virus is characterized by high mortality and the ability to transmit from birds to humans. Early diagnosis is difficult because of the variation in pathogenicity and the genetic diversity between virus subtypes. Therefore, development of a sensitive and accurate diagnostic system is an urgent priority. We developed ssDNA aptamer probes to detect AI viruses. Through seven rounds of SELEX to search for a probe specific to the highly pathogenic AI virus subtype H5N1, we identified 16 binding aptamers and selected two with the highest binding frequency. These two aptamers had strong binding affinities and low detection limits. We found that they could bind more specifically to H5N1, as compared to other subtypes. Furthermore, these aptamers inhibited hemagglutination, which is caused by the virus surface protein hemagglutinin. Our results indicate that our screened aptamers are effective molecular probes for diagnosing H5N1 and can be used as therapeutic agents to inhibit viral surface proteins. Sensitive diagnosis and suppression of avian influenza will help maintain a stable and healthy livestock industry, as well as protect human health.