The cooperative effects of cation–anion are elucidated in ionic liquid-catalyzed reactions of aniline with ethylene carbonate and the reaction of phenylacetonitrile with dimethyl carbonate. Cations of ionic liquids activate electrophiles by the proton in the 2-position of the imidazolium ring through the hydrogen-bond interaction with the carbonyl group. The catalytic activity follows the order of 1-butyl-3-methyl-imidazolium ([Bmim])>1,2-dimethyl-3-butyl imidazolium ([Bmmim])>1-butyl-pyridinium ([Bpy]), which is consistent with the order of the hydrogen bond donor ability. Simultaneously, anions of ionic liquids activate nucleophiles by accepting the hydrogen bond. The catalytic activity of imidazolium-based ionic liquids follows the order Cl>Br>BF4>PF6>C(CN)2COOEt≈NTf2>BPh4, which is consistent with the order of the hydrogen bond acceptor ability. The dual activation of nucleophiles and electrophiles by the cations and anions of ionic liquids is crucial to promote the reaction in high yields.