The invention discloses a preparation method and biological activity of a pentadiene ketone compound, containing 1,3,4-oxadiazole sulfo-ethyoxyl, with a function of preventing and treating a plant virus disease, namely a compound expressed in a general formula (I) and a preparation method of the compound. According to the method, by using substituted carboxylic acid, hydrazine hydrate, carbon disulfide, acetone, 4-substituted hydroxy benzaldehyde, substituted aromatic aldehyde, 1,2-dibromoethane and the like as raw materials, methanol, ethanol and N,N-dimethylformamide as solvents and potassium carbonate, sodium hydroxide and potassium hydroxide as catalysts, pentadiene ketone compound containing 1,3,4-oxadiazole sulfo-ethyoxyl is prepared through seven-step synthesis. The compounds I3, I4, I6, I11, I13, I14, I16 and I17 have good functions in cucumber mosaic virus, tobacco mosaic virus, southern rice black-streaked dwarf virus and the like. The formula is shown in the specification.