Influenza A viruses (IAVs) constitute a major threat to human and animal health. Currently, M2 ion-channel inhibitors, neuraminidase (NA) inhibitors, RNA polymerase inhibitors, and cap-dependent endonuclease inhibitors have been applied clinically as therapeutics against IAVs. However, IAVs possess adaptive mutations to these inhibitors, especially M2 ion channel and NA inhibitors. Thus, novel antiviral agents should be developed. In the present study, we screen approximately 5500 compounds and identify an IAV inhibitor, nanchangmycin, which possesses a robust antiviral activity both in vitro and in vivo. In addition, it exhibits broad-spectrum antiviral activity for additional virus infections, including pseudorabies virus, herpes virus, porcine epidemic diarrhea virus, porcine reproductive and respiratory syndrome virus. Most importantly, it has antiviral activity against oseltamivir-resistant strains in sub-μM ranges and promotes the survival of MDCK cells infected with the oseltamivir-resistant influenza A virus strain. Further studies reveal that it blocks the nuclei migration of viral nuclear proteins (NPs), resulting in NP accumulation in the cytoplasm, particularly within perinuclear endosomes. Also, it inhibits IAVs by blocking endosomal acidification. Overall, nanchangmycin has the potential to be developed as an anti-influenza agent.