The general procedure for the synthesis of 4-(4-methylpiperazin-1-yl)benzonitrile from N-methylpiperazine and p-fluorobenzonitrile was as follows: to a solution of dimethyl sulfoxide (7 mL) containing 4-fluorobenzonitrile (1.0 g, 8.25 mmol) and potassium carbonate (2.27 g, 16.51 mmol) was added 1-methylpiperazine (1.36 mL, 12.38 mmol). The reaction mixture was stirred at room temperature for the reaction. Upon completion of the reaction, the target product 4-(4-methylpiperazin-1-yl)benzonitrile (1.54 g, 93% yield) was obtained by conventional post-processing. The structure of the product was confirmed by 1H-NMR (500 MHz, CDCl3) and ESI-MS: 1H-NMR δ 2.36 (3H, s), 2.55 (4H, t, J = 4.88 Hz), 3.35 (4H, t, J = 4.88 Hz), 6.87 (2H, d, J = 8.78 Hz), 7.49 (2H, d, J = 8.78 Hz); ESI-MS m/z 202.1 ([M+H]+).