A process for preparation of 3-{ -4-methyl-3-[methyl(7H-pyrrolo[2,3-d]pyrimidin-4-yl)amino]piperidin-1-yl}-3-oxo-propanenitrile or a salt thereof comprising: (i) N-acylation of 3-amino-4-methyl pyridine with alkyl, aryl or substituted aryl acid chloride or acid anhydride to prepare a compound of Formula IVa and optionally isolating the compound of Formula IVa; (ii) quarternization of the nitrogen of the pyridine group in the compound of Formula IVa, with benzyl or substituted benzyl halide in a first solvent comprising a first organic solvent to prepare a compound of Formula Va and optionally isolating the compound of Formula Va; (iii) partial reduction of the compound of the Formula Va in presence of a first reducing agent in a second solvent at ambient temperature to produce a compound of the Formula VIa having a 1,2,5,6-tetrahydropyridine system; (iv) hydrolysis of the 1,2,5,6-tetrahydropyridine system of the compound of Formula VIa in presence of an acid or mixture of acids to prepare a compound of the Formula VIIa; (v) reductive amination of the compound of Formula VIIa with methylamine in presence of a Lewis acid, in a third solvent comprising a third organic solvent, water, or mixture thereof; followed by reduction with a second reducing agent at an ambient temperature, to prepare a compound of Formula VIIIa; (vi) resolution of a compound of Formula VIIIa in presence of a resolving agent, in a fourth solvent comprising a fourth organic solvent, water, or mixture thereof; to prepare a compound of Formula IIa; and (vii) converting the compound of Formula IIa into 3-{ -4-methyl-3-[methyl(7H-pyrrolo[2,3-d]pyrimidin-4-yl)amino]piperidin-1-yl}-3-oxo-propanenitrile; wherein R is selected from hydrogen, alkyl, aryl or substituted aryl; R' is selected from aryl or substituted aryl group; and X represents a halide selected from chloro, bromo, and iodo. (i) N-acylation of 3-amino-4-methyl pyridine with alkyl, aryl or substituted aryl acid chloride or acid anhydride to prepare a compound of Formula IVa and optionally isolating the compound of Formula IVa; (ii) quarternization of the nitrogen of the pyridine group in the compound of Formula IVa, with benzyl or substituted benzyl halide in a first solvent comprising a first organic solvent to prepare a compound of Formula Va and optionally isolating the compound of Formula Va; (iii) partial reduction of the compound of the Formula Va in presence of a first reducing agent in a second solvent at ambient temperature to produce a compound of the Formula VIa having a 1,2,5,6-tetrahydropyridine system; (iv) hydrolysis of the 1,2,5,6-tetrahydropyridine system of the compound of Formula VIa in presence of an acid or mixture of acids to prepare a compound of the Formula VIIa; (v) reductive amination of the compound of Formula VIIa with methylamine in presence of a Lewis acid, in a third solvent comprising a third organic solvent, water, or mixture thereof; followed by reduction with a second reducing agent at an ambient temperature, to prepare a compound of Formula VIIIa; (vi) resolution of a compound of Formula VIIIa in presence of a resolving agent, in a fourth solvent comprising a fourth organic solvent, water, or mixture thereof; to prepare a compound of Formula IIa; and (vii) converting the compound of Formula IIa into 3-{ -4-methyl-3-[methyl(7H-pyrrolo[2,3-d]pyrimidin-4-yl)amino]piperidin-1-yl}-3-oxo-propanenitrile; <EOS>