Doravirine is non-nucleoside reverse transcriptase inhibitor (NNRTI) currently in phase III clinical trials for the treatment of HIV infection. Herein we describe a robust kilo-scale synthesis for its manufacture. The structure and origin of major impurities were determined and their downstream fate-and-purge studied. This resulted in a redesign of the route to introduce the key nitrile functionality via a copper mediated cyanation which allowed all impurities to be controlled to an acceptable level. The improved synthesis was scaled to prepare ∼100 kg batches of doravirine to supply all preclinical and clinical studies up to phase III. The synthesis affords high-quality material in a longest linear sequence of six steps and 37% overall yield.