Two series of benzamides compounds bearing piperidine groups were synthesized and the Gli-luc luciferase activity was screened by Gys-luc luciferase gene detection method. Compound 5q showed promising inhibition of hedgehog (Hh) signaling pathway. To further verify whether the Hh inhibitory activities of the target compounds are derived from their inhibition to the Smoothened (Smo) receptor, the compounds with good potency were evaluated in a fluorescence competitive displacement assays, the results showed the Smo inhibitory potency of these compounds correlated well with their Hh inhibition, which suggested that the observed Hh activity was driven by Smo inhibitors.