NOVELTY - Preparation of imatinib citric acid (X) involves adding polar aprotic solvent and organic alkali to methyl-((3R,4R)-4-methyl-piperidin-3-yl)-(7H-pyrrolo(2,3-d)pyrimidin-4-yl)-amine, performing condensation reaction at 40-90 degrees C for 8-10 hours, centrifuging the resultant reaction mixture, obtaining 3-((R)-4-methyl-3-((R)-methyl-(7H-pyrrolo(2,3-d)pyrimidin-4-yl)-amino)-piperidin-1-yl)-3-oxo-propionitrile (VIII), adding polar non-protonic solvent, citric acid and ethyl cyanoacetate (IX), reacting at 30-40 degrees C, centrifuging, washing the resultant material and recrystallizing.    USE - Preparation of imatinib citric acid used in medicine for treating rheumatoid arthritis.    ADVANTAGE - The method provides imatinib citric acid with high purity and yield, and reduced total impurity content, by simple, economical and environmentally-friendly process in short period of time.    DETAILED DESCRIPTION - Preparation of imatinib citric acid of formula (X) involves dissolving 4-chloro-7-(toluene-4-sulfonyl)-7H-pyrrolo(2,3-d)pyrimidine of formula (I) or 7-benzenesulfonyl-4-chloro-7H-pyrrolo(2,3-d)pyrimidine of formula (II) and (3R,4R)-1-benzyl-N,4-dimethylpiperidin-3-amine hydrochloride of formula (III) in polar aprotic solvent, reacting at 65-95 degrees C for 8-12 hours under effect of inorganic alkali, cooling the resultant reaction mixture, washing with water, pulping, obtaining ((3R,4R)-1-benzyl-4-methyl-piperidin-3-yl)-methyl-(7-(toluene-4-sulfonyl)-7H-pyrrolo(2,3-d)pyrimidin-4-yl)-amine of formula (IV) or (7-benzenesulfonyl-7H-pyrrolo(2,3-d)pyrimidin-4-yl)-((3R,4R)-1-benzyl-4-methyl-piperidin-3-yl)-methyl-amine of formula (V), adding 10-60% mass sodium hydroxide aqueous solution, reacting at 80-100 degrees C for 4-6 hours, cooling the resultant reaction mixture to 40-50 degrees C, adding water, stirring uniformly, cooling, washing with water, pulping, centrifuging, obtaining ((3R,4R)-1-benzyl-4-methyl-piperidin-3-yl)-methyl-(7H-pyrrolo(2,3-d)pyrimidin-4-yl)-amine of formula (VI), adding polar protic solvent, palladium hydroxide and acetic acid, performing hydrogenation reaction at 30-60 degrees C for 8-12 hours, filtering, concentrating, obtaining methyl-((3R,4R)-4-methyl-piperidin-3-yl)-(7H-pyrrolo(2,3-d)pyrimidin-4-yl)-amine of formula (VII), adding polar aprotic solvent and organic alkali, performing condensation reaction at 40-90 degrees C for 8-10 hours, centrifuging the resultant reaction mixture, obtaining 3-((R)-4-methyl-3-((R)-methyl-(7H-pyrrolo(2,3-d)pyrimidin-4-yl)-amino)-piperidin-1-yl)-3-oxo-propionitrile of formula (VIII), adding polar non-protonic solvent, citric acid and ethyl cyanoacetate of formula (IX), reacting at 30-40 degrees C for 8-10 hours, centrifuging, washing the resultant material, recrystallizing using polar protic solvent and obtaining imatinib citric acid (X). The molar ratio of compound (I) or compound (II) with compound (III) is 1:0.9-0.98. The molar ratio of compound (VII) and organic alkali is 1:1.2- 2. The molar ratio of compound (VIII), polar non-protonic solvent and citric acid is 1:1.5:2.