The application of pityriacitrin alkaloids and derivatives thereof in anti-plant viruses and germs of the present invention relates to the biocides of pityriacitrin alkaloids and derivatives thereof containing 1-acyl-substituted β-carboline skeletons, specifically twenty kinds of pityriacitrins Alkaloids and derivatives thereof are used as anti-plant virus agents and as phytopathogenic fungicides, said anti-plant virus agents are used for tobacco mosaic virus, pepper virus, rice virus, tomato virus, sweet potato virus, potato virus Virus, melon virus and corn dwarf mosaic virus; described as phytopathogenic fungicide is used to suppress cucumber withering, rice blast, peanut brown spot, apple ring pattern, wheat sheath withered, corn small spot, watermelon anthracnose , Bakanae of rice, tomato early blight, wheat gibberella, potato late blight, capsicum phytophthora, rape sclerotia, cucumber gray mold, rice sheath blight and other 15 kinds of plant pathogens.