The present invention relates to a preparation method for a blattodea polypeptide substance, and a medical use of the blattodea polypeptide substance in anti-herpesvirus. Specifically the present invention relates to a blattodea extract effective fraction having a function of prevention and treatment of herpes simplex virus infection diseases, a preparation method and a medical use thereof. The Periplaneta Americana extract effective fraction of the present invention is a polypeptide substance with a molecular weight less than 5000 dalton, and is prepared by the following steps: carrying out extraction on fresh polypide or dried polypide of Periplaneta Americana with water or an organic solvent and a buffer, and then carrying out a membrane separation method to refine to obtain the product of the present invention, wherein the polypeptide active substance of the effective fraction has significant anti-herpes simplex virus (HSV-1 and HSV-2) activities, can be prepared into forms of a hydrogel, a cataplasm, lyophilized powder, a water agent, an aerosol, a suppository, a film agent, an external application liniment, and an ointment, and can be used for preparations of drugs for prevention and treatment of herpes simplex virus infections, daily chemical products or medical devices.