Disclosed is an application of substituted cinnamamide derivatives in the preparation of anti-anxiety medications, the substituted cinnammide derivatives are compounds having the structure of formula (I) or pharmaceutically acceptable salts thereof, wherein, R1 is -H, -OH, -F, -Cl, -Br, -I, -OCH3, -OCF3, -OCHF2, -OCH2F, -CF3, -CHF2, -CH2F, -CH3, -CH3CH2, -CF3CH2, -CN, -NO2, -NH2 or -COOR5; R2 is H, C1-C10 linear alkyl, C3-C10 branched alkyl, C3-C10 cyclic alkyl, C1-C10 hydroxyalkyl or a N-substituted piperazine-derived group; or R2 is a group forming with adjacent Y a tetrahydropyrrolyl group, a piperidyl group or a cyclohexanimido group.