We optimized the synthesis process of the key intermediates of Rilpivirine,4-((4-chloro-2-pyrim-idinyl)amino)benzonitrile(1)and(E)-3-(4-amino-3,5-dimethylphenyl)acrylonitrile(2).The results show that,when uracil is taken as a starting material,the key intermediate 1 is synthesized through chlorination and cou-pling reactions,and the synthetic raw materials are inexpensive and more environmentally friendly than the re-ported routes.When 4-bromo-2,6-dimethylaniline(5)is taken as a starting material and using DMA as the reac-tion solvent,(E)-3-(4-amino-3,5-dimethylphenyl)acrylamide is synthesized with the yield of 85.94%via Heck reaction under the optimal conditions as follows:the n(5)∶n(acrylamide)∶n(palladium acetate)∶n(tris(2-methyl-phenyl)phosphine)of 1∶2∶0.1∶0.3,the reaction temperature of 120 ℃,and the reaction time of 24 h.Then,by changing the post-treatment method which the reaction solution is slowly added dropwise to ice water and stirring at-5 ℃ for 2 h,the key intermediate 2 is obtained.The synthetic route is more economical,environmentally friendly,and conducive to industrial production.