A compound having the structure of formula I and its use as a Cdc42 inhibitor. Morphological analyses of filopodia, western blots of Ccd42 phosphorylation, and the experiments on cellular wound healing and on growth cone formation all demonstrate that the compound provided in the present invention is able to inhibit all tested Cdc42-mediated processes. The compounds effectively inhibited the effects of Cdc42 and effectively inhibit Cdc42-related cellular functions involving actin, such as Golgi organization and cell movement.