An efficient protocol is developed for the synthesis of Rilpivirine intermediate 4-[(4-chloro-2-pyrimidinyl) amino]benzonitrile hydrochloride via a simple two-step approach. Initially 1-(4-cyanophenyl)guanidine hydrochloride was prepared by reacting 4-cyanoaniline hydrochloride with aqueous cyanamide in diglyme. Then ethyl acetate was reacted with methyl formate in presence of anhydrous sodium methoxide to generate ethyl 3-oxopropanoate in situ, which was further reacted with 1-(4-cyanophenyl)guanidine hydrochloride to generate the pyrimidine intermediate. Chlorination of the pyrimidine intermediate afforded the target compound, Rilpivirine. The significant advantages of the method include cost-effectiveness, excellent yield and scope for large-scale production.