The invention provides application of a substituted cinnamamide derivative to preparation of anxiolytic medicine. The substituted cinnamamide derivative uses a compound of a structure shown by a formula (I) or a pharmaceutically acceptable salt as a medicine active ingredient. The concrete formula is shown as the accompanying drawing; in the formula, 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 straight-chain alkyls, C3-C10 branch-chain alkyl groups, C3-C10 cyclic hydrocarbon groups, C1-C10 hydroxyalkyls or N-substituted piperazine derivative groups; or the R2 is a group forming a nafoxidine group, a piperidyl or a cyclohexylamine group with the adjacent X. The formula (I) is shown as the accompanying drawing.