In a previous paper, we reported that a novel ranitidine derivative 2 (fumarate: KW-5092), which had a 2-imidazolidinylidene propanedinitrile moiety (A), showed potent gastrointestinal motility enhancing activity. In order to obtain more potent gastrointestinal motility enhancing agents than compound 2 and to examine the effects of various substituents both at a nitrogen atom (B) in the 2-imidazolidinylidene propanedinitrile moiety and a basic nitrogen atom (C), compounds 5-29 were synthesized and evaluated for acetylcholinesterase (AChE) inhibitory activity and potentiating action on electrically stimulated contractions of guinea pig ileum. Introduction of alkyl, benzyl, aryl or acyl groups to the nitrogen (B) or (C), remarkably influenced both activities. Among these, compounds 14 and 15 showed more potent AChE inhibitory activity (IC50 = 6.7, 6.8 nM, respectively) than compound 2 and were active in potentiating action on the ileal contraction (EC30 = 9.5, 11 nM, respectively) together with a negligible histamine H2-receptor blocking property. Furthermore, these compounds were found to be more effective in the enhancement of gastrointestinal motility in anesthetized rabbits than compound 2.