The present invention provides alkaloids with formula I, II, III, IV, or V and their pharmaceutically acceptable salts, their preparation and their uses as antivirus drugs, for example, for treatment of HSV-1 infection. The alkaloids with formula I were isolated from the fermentation of marine fungus Scopulariopsis sp.(TA01-33) by means of column chromatography, such as positive phase silica gel column chromatography, etc. Alkaloids with formula II, III, IV and V were semisynthesized from compounds with formula I.