Palladium-catalyzed direct C-H arylation of N-iminopyridinium ylides provides a powerful and versatile method for the synthesis of functionalized piperidines in good yields. Chemoselective functionalization of the pyridinium ring in the presence of a pyridine substituent is possible as exemplified by the expedient synthesis of anabasine in 61% overall yield over three steps.