The invention provides a use of 1,2,3,4,6-penta-O-galloyl-b-D-glucose in the preparation of anti-flu drugs, foods or cosmetics. The 1,2,3,4,6-penta-O-galloyl-b-D-glucose not only has very strong anti-viral activity, but also has activity of inactivating virus, and the activity concentration is out of the range of cytotoxicity, so that the 1,2,3,4,6-penta-O-galloyl-b-D-glucose can directly inactivate the virus, inactivate the contacted virus, lead the virus to lose infection ability or play a therapeutic role to cells infected by the virus, be used for developing drugs, be applied in the food field, such as beverages and the like or the cosmetics field, and be also widely applied in health care products which can prevent and treat the virus.