A general method for the preparation of unsymmetrical trans-2-allyl-6-alkyl(aryl)1,2,3,6-tetrahydropyridines 6 based on a combination of 1,2-addition of RLi to pyridine and trans-6-allylation with triallylborane in the presence of methanol was elaborated. It was shown that trans-piperideines 6 (R = Alk, Ph) isomerize into the corresponding cis-2-allyl-6-alkyl(phenyl)-3-piperideines 14 on heating with triallylborane followed by deboronation of aminoborane (16) with methanol and an alkali. The stereochemistry of compounds 6 and 14 was determined by two-dimensional NOE spectroscopy. A possible mechanism of the formation of trans-amines 6 and their transformation into cis-isomers 14 is discussed. Alkaloids (+/-)-epidihydropinidine (trans-2-methyl-6-propylpiperidine 2a, 70%) and (+/-)-dihydropinidine (cis-2-methyl-6-propylpiperidine 1d, 71%) were synthesized by hydrogenation of compound 6a (R = Me) and 14a (R = Me), respectively, over Raney nickel.