Former Doctor Who showrunner, Steven Moffat, subtly altered the mythology of the Valeyard during his tenure on the show. Introduced during the era of Colin Baker's Sixth Doctor, the Valeyard acted as recurring villain during the Trial of a Time Lord season and was eventually revealed as an evil future incarnation of the Doctor that had traveled back in an attempt to frame the Sixth Doctor and steal his remaining regenerations. The Valeyard also claimed to seek freedom and "operate as a complete entity" by killing the Doctor - the moral counterpart to his own existence.
Anthony Ainley's Master describes the Valeyard as an amalgamation of the Doctor's darkness that occurred sometime after his twelfth incarnation, and while this wasn't a problem for Doctor Who in 1986, as the iconic series was slowly creepy towards cancellation, it did represent a potential pitfall for Steven Moffat, who became Doctor Who's showrunner in 2009. The Moffat era began with Matt Smith's Eleventh Doctor and extended into Peter Capaldi's Twelfth, although later developments revealed that a meta-crisis severed hand was the true Twelfth Doctor. In any case, the Valeyard's backstory presented a problem for Doctor Who in that, from the outset of Moffat's reign, every regeneration would theoretically have a chance of producing the Valeyard.
Obviously the BBC weren't going to allow Doctor Who's lead character to suddenly become a villain, and modern Who has previous when it comes to ignoring inconvenient parts of the show's classic mythology. However, the Valeyard is such a popular and frequently discussed part of Doctor Who lore that to ignore the issue entirely when that magic twelfth regeneration arrived was out of the question. In typical Moffat fashion, the showrunner dropped a couple of subtle references, proving to veteran fans that the villain hadn't been forgotten but also re-framing the Valeyard's story somewhat, putting his appearance off into the show's far future.
In "The Name of the Doctor," Richard E. Grant's Great Intelligence hijacks the Doctor's time stream and, for the first time in the modern series, confirms that "the Valeyard" would be a future name the Doctor takes. However, instead of specifying that the character would appear from the Twelfth Doctor onward, the Intelligence merely claims that the villain's creation would occur "before the end." While this doesn't necessarily contradict the Master's words - "between the twelfth and final" and "before the end" can essentially mean the same thing, after all - the original explanation put emphasis on the Twelfth Doctor as the game-changing point, whereas Moffat's updated reference puts the Doctor's evil regeneration into the far future of the series, indicating to newer fans that the Valeyard isn't arriving any time soon.
Steven Moffat's adjusting of the Valeyard's lore continued in the showrunner's final episode, "Twice Upon A Time." In this Christmas special, one of the Doctor's names is revealed to be "the Shadow of the Valeyard." This new title opens up several possibilities for Doctor Who's future. Is "Shadow of the Valeyard" the full title of the villain seen facing off against the Sixth Doctor? Or does this name refer to the Doctor being the moral shadow to the Valeyard's evil? In either case, Moffat is setting up the Valeyard for Doctor Who's future but, unlike before, is being careful not to specify when fans can expect his appearance.
In truth, Doctor Who is never going to turn its main character into a villain, but that doesn't mean the Valeyard can't feature at all. As with Trial of the Time Lord, it would be fascinating to see Jodie Whittaker's Doctor take on an evil future version of herself and possibly even attempt to prevent this incarnation from ever happening. However, the longer Doctor Who puts off introducing the Valeyard, especially now the show is well past 12 regenerations, the more fans will speculate as to when this villain will appear.
Doctor Who season 12 premieres in 2020 on BBC and BBC America.