A 4-component Ugi reaction with a suitable isocyanide, followed by a novel secondary transformation involving a Pd(II)-mediated (R5 = H) or a Pd(0)-mediated (R5 = CO2Me) SN2' cyclization to give highly functionalized N-acyl-2-vinylpyrrolidines, is reported. The overall yields are usually good and in most cases the Pd(0)-catalyzed reaction gave the final product in almost quantitative yield.