A method for synthesis of diarylpyrimidine non-nucleoside reverse transcriptase inhibitor such as etravirine is provided Typically, etravirine is synthesized by the steps of a Condensing 2,4,6-trichlorpyrimidine with 3,5-dimethyl-4-hydroxybenzonitrile to obtain compound (V), b Condensing compound (V) with 4-aminobenzonitrile to obtain compound (VI), c Ammonolysis of compound (VI) to get compound (IV), d Halogenation of compound (IV) to get etravirine.