A solvent-controlled switchable C鈥揌 alkenylation of 4-aryl-1H-pyrrole-3-carboxylates via a Pd(OAc)2 catalyzed oxidative Heck reaction was first realized. The corresponding C2 and C5 alkenylation products were obtained in good yields with high regioselectivities, respectively. The selective C5-alkenylation was successfully applied to the total synthesis of (卤)-rhazinilam.