The invention discloses an N-[(3R,4R)-1-benzyl-4-methylpiperidine-3-yl]-N-methyl-7H-pyrrolo[2,3-d] 
pyrimidine-4-amine 
crystal and a preparation method thereof. The method comprises steps as follows: firstly, 4-chloro-7-(p-tolylsulfonyl) pyrrolo [2,3-d] 
pyrimidine, 1-benzyl-4-methyl-3-aminomethyl dihydrochloride, 
potassium carbonate and water are added to a reaction vessel sequentially, heated and subjected to 
thermal insulation, and white solids are obtained; the white solids, 
sodium hydroxide and n-butyl 
alcohol are added to the reaction vessel sequentially, an obtained organic phase is washed with water, then 
anhydrous magnesium sulfate is added to the organic phase for 
dehydration, and a 
dichloromethane extracting solution is obtained; finally, eluting and curing are performed, and the 
crystal is obtained. The purity of the 
crystal is higher than 99.9%. According to a final product 
tofacitinib citrate synthesized with the intermediate, related substances are controlled to be lower than 0.1%, and the preparation of the crystal has great technical 
advantage and research value.