The invention relates to a resveratrol derivative and a medical application thereof, and in particular discloses a compound in a formula I as shown in the specification or pharmaceutically acceptable salt, ester, solvate and stereoisomer thereof, wherein R1, R2 and R3 are respectively independently selected from hydrogen atom, C1-C3 alkyl groups, or a substituent group in a formula i as shown in the specification, at least one of R1, R2 and R3 is selected from the C1-C3 alkyl groups, and simultaneously at least one of R1, R2 and R3 is selected from the substituent group in the formula i; R is selected from hydrogen atom, substituted or unsubstituted C1-C5 alkyl groups, substituted or unsubstituted C3-C6 naphthenic groups, benzyl groups or phenyl groups; and R4 and R5 are respectively independently selected from hydrogen atom, substituted or unsubstituted C1-C5 alkyl groups, or substituted or unsubstituted C3-C6 naphthenic groups. The invention also discloses a pharmaceutical composition containing the compound in the formula I, and the application of the compound in the formula I in preparing medicines for treating and/or preventing cardiovascular and cerebrovascular diseases. The compound in the formula I provided by the invention can be effectively used for treating and/or preventing the cardiovascular and cerebrovascular diseases such as hyperlipidaemia.