Disclosed is application of an avocado extract to preparation of health food or a food additive for preventing virus infection of a Flaviviridae family. The present invention also provides application of avocadenol B and (2R,4R)-1,2,4-trihydroxy heptadec-16-yne to preparation of drugs for treating or preventing virus infection of a Flaviviridae family. The present invention further provides health food for inhibiting the virus replication activity or viral inflammatory response of a Flaviviridae family, comprising an effective dose of avocado extracts serving as active ingredients and pharmaceutically acceptable carriers.