Bovine herpesvirus 1 (BoHV-1) is a major pathogen of infectious bovine rhinotracheitis in bovine. Previously, we generated the aptamer IBRV A4 using systemic evolution of ligands by exponential enrichment. This aptamer inhibited infectivity of BoHV-1 by blocking viral particle absorption onto cell membranes. In this study, we found that the major tegument protein VP8 of BoHV-1 was involved in inhibition of infectious virus production by IBRV A4. We improved the affinity of IBRV A4 for VP8 by optimizing aptamer's structure and repeat conformation. An optimized aptamer, IBRV A4.7, was constructed with quadruple binding sites and a new stem-loop structure, which had a stronger binding affinity for VP8 or BoHV-1 than raw aptamer IBRV A4. IBRV A4.7 bound to VP8 with a dissociation constant (Kd) value of 0.2054 ± 0.03948 nM and bound to BoHV-1 with a Kd value of 0.3637 ± 0.05452 nM. Crucially, IBRV A4.7 had improved antiviral activity compared to IBRV A4, with a half-maximal inhibitory concentration of 1.16 ± 0.042 μM. Our results also revealed IBRV A4.7 inhibited BoHV-1 production in MDBK cells through blocking nucleocytoplasmic shuttling of viral VP8 in BoHV-1-infected MDBK cells. In conclusion, the aptamer IBRV A4.7 may have potency in preventing outbreaks in herds due to reactivation of latency.