The invention provides application of 1,2,3,4,6-penta-O-galloyl-b-D-glucose in preparing a medicine for resisting herpes simplex viruses, and in particular relates to application of the 1,2,3,4,6-penta-O-galloyl-b-D-glucose in preparing a medicine for resisting herpes simplex virus type 1. The 1,2,3,4,6-penta-O-galloyl-b-D-glucose has the function of preventing and treating cells infected by HSV-1, can also reduce the infectivity of the HSV-1 on MRC-5 cells, has the function of directly killing the HSV-1, and can reduce the activity of MRC-5 cells infected by the HSV-1; and the medicine for resisting the herpes simplex virus type 1 prepared by taking the 1,2,3,4,6-penta-O-galloyl-b-D-glucose as an effective ingredient has high suppression ratio on the herpes simplex virus type 1 within a safe dosage range, has strong function of preventing infection of the herpes simplex virus type 1, quickly cures patients, can relieve syndromes of infected patients, and has low toxicity and good stability.