Avian influenza viruses (AIV) with good adaptation and various mutations have threatened both human and animals’ health. The H7 subtypes have the potential to cause pandemic threats to human health due to the highly pathogenic characteristics. Therefore, it is quite urgent to develop a novel biosensor for rapid and sensitive detection of H7 subtypes. In this work, a biosensor based on luminescence resonance energy transfer (LRET) from BaGdF5:Yb/Er upconversion nanoparticles (UCNPs) to gold nanoparticles (AuNPs) has been developed for rapid and sensitive H7 subtypes detection. The amino modified capture oligonucleotide probes are covalently linked to poly(ethylenimine) (PEI) modified BaGdF5:Yb/Er UCNPs. The thiol modified oligonucleotides with H7 hemagglutinin gene sequence are conjugated to surfaces of AuNPs. The hybridization process between complementary strands of H7 Hemagglutinin gene and its probe brings the energy donor and acceptor into close proximity, leading to the quenching of fluorescence of UCNPs. A linear response is obtained ranging from 10 pm to 10 nm and the limit of detection (LOD) is around 7 pm with detection time around 2 hours. This biosensor is expected to be a valuable diagnostic tool for rapid and sensitive detection of AIV.