The invention discloses an efficient and safe method for synthesizing citric acid tofacitinib. N-[(3R,4R)-1-benzyl-4-methylpiperidine-3-base]-N-methyl-7H-pyrrolo[2,3-d]pyrimidine-4-amine is used as the raw material, Pd / C and HCOOH reduction debenzylation is conducted, condensation is conducted under the catalysis of an EDCI or EDCI, HOBT and triethylamine compound system with cyanoacetic acid, and salifying is conducted with citric acid in acetone to obtain citric acid tofacitinib. By the adoption of the synthesis method, potential safety hazards caused by hydrogen and ammonium formate are avoided, debenzylation reaction and amidation are thorough, no side reaction is caused basically, reaction time is shortened greatly, yield is high, aftertreatment is easy, and citric acid tofacitinib can be prepared efficiently and safely.