Wesley is introduced in the Buffy the Vampire Slayer season three (1998–1999) episode "Bad Girls" as the new Watcher of Buffy (Sarah Michelle Gellar) and Faith (Eliza Dushku). Pompous and ineffective, he fails to elicit any respect from either his Slayers or his predecessor, Rupert Giles (Anthony Stewart Head), all of whom frequently ridicule and undermine him. He develops a crush on high school senior Cordelia Chase (Charisma Carpenter), and their mutual flirting throughout the season culminates in a pair of awkward kisses in the finale "Graduation Day, Part Two". When Faith goes rogue after accidentally killing a human being, the Scooby Gang neglect to inform Wesley, and his subsequent interference ruins Faith's brief chance at redemption. When Wesley fails to convince the Watchers' Council to help save the life of her vampire lover Angel (David Boreanaz), an enraged Buffy severs all ties with them. Despite this, Wesley offers his assistance in the fight against the Mayor, proving entirely useless in battle when he is knocked down almost instantly.
Wesley reappears in the first season (1999–2000) of spin-off show Angel, in the episode "Parting Gifts". Introduced as a self-proclaimed "rogue demon hunter", Wesley reveals that he was fired from the Watchers' Council for incompetence, but is soon accepted into supernatural detective agency Angel Investigations, working alongside Angel and Cordelia (effectively filling the gap left by the death of Doyle (Glenn Quinn)). When Faith is hired by evil law firm Wolfram & Hart to assassinate Angel, Wesley is kidnapped and tortured by his former charge, until Angel forces Faith to take responsibility for her actions. Although still bitter towards her and doubtful of her chances at redemption, Wesley proves his loyalty to Angel by betraying his former colleagues at the Watchers' Council to protect Faith. In the second season (2000–2001), Wesley embarks on a romantic relationship with a woman named Virginia Bryce after helping to prevent her father from sacrificing her to a demon. When Angel descends into darkness and fires the team, Wesley continues Angel Investigations with Cordelia and Charles Gunn (J. August Richards). Having overcome his cowardice of earlier episodes, he gets himself shot trying to protect Gunn and spends the next two episodes in a wheelchair; this injury also leads to the demise of his relationship with Virginia, who becomes disturbed by his dangerous lifestyle. When Angel returns to the fold, Wesley is appointed team leader, but feels inferior due to his father's berating and Angel's habit of taking charge. However, when put in charge of a rebellion in the demon dimension Pylea, Wesley proves to be an effective, albeit ruthless, leader.
In Angel's third season (2001–2002), Wesley's path becomes filled with tragedies and difficult choices. Just as he starts developing romantic feelings for his teammate Fred (Amy Acker), he finds himself mystically influenced to kill her after a demon influences him to become homicidally misogynistic. While studying the birth of Angel's infant son Connor, Wesley discovers a prophecy which claims that Angel will kill the baby. Intending to take him to safety, Wesley betrays his friends and kidnaps Connor, a decision which has disastrous consequences when he has his throat slit and the baby is kidnapped into a hell dimension by Angel's sworn enemy, Holtz. Angel then attempts to kill him while he is in recovery at the hospital. Alienated from Angel Investigations, a recovered Wesley forms his own team to fight evil, but maintains an interest in his former friends' affairs. He also begins a sexual relationship with Wolfram & Hart lawyer Lilah Morgan (Stephanie Romanov), who tries to convince him to join the firm. In the fourth season (2002–2003), Angel is rescued and revived by Wesley after being sunk to the bottom of the ocean by his now-adolescent son Connor (Vincent Kartheiser). Wesley eventually returns to the team full-time to help them battle the Beast, making difficult decisions such as seeking the aid of Angel's evil alter ego Angelus and breaking Faith out of prison. Having developed genuine feelings for Lilah, he mourns her when she is killed by Cordelia, now possessed by the entity known as Jasmine (Gina Torres). In the season finale, following the defeat of Jasmine, Wesley joins the rest of Angel Investigations in taking over Wolfram & Hart in the hopes that they can turn it into a power for good.
Season five (2003–2004) sees Wesley suffer yet more loss. In the episode "Lineage", Wesley's father makes his first appearance after being alluded to in earlier episodes. Roger Wyndam-Pryce (Roy Dotrice) is revealed to have sinister intentions when he tries to steal Angel's free will and threatens to murder Fred; Wesley responds by shooting him dead, only to discover he was not actually his father, but a cyborg copy. Despite the deception having been revealed, he is visibly shaken by his willingness to end his father's life to save another. After being in love with her for almost two seasons, Wesley finally gets together with Fred in the subsequent episode "Smile Time", only to watch her die in the next episode when she is taken over by the ancient demon Illyria. He retaliates by killing Knox, the man responsible for raising Illyria, and stabbing Gunn after discovering he played an indirect role in Fred's death. Descending into alcoholism, Wesley holds onto Illyria as the only thing he has left of Fred, helping her understand the human world she is unfamiliar with. He inadvertently restores his and his friends' memories of Connor when he smashes the Orlon Window, thinking that Angel had betrayed his trust. Wesley visibly feels guilty after remembering how he betrayed his friends by taking Connor from Angel and later apologizes to Gunn for stabbing him. Towards the end of the season, Angel proposes an attack against the Circle of the Black Thorn, a powerful group of demons under the employ of the Wolfram & Hart's Senior Partners. In the show's final episode, Wesley does battle with the warlock Cyvus Vail (Dennis Christopher) and is mortally wounded. He spends his dying moments with Illyria at his side, finally agreeing to let the demon take the form of Fred, thus allowing Wesley, in some way, to say goodbye to the woman he loved.
Joss Whedon revealed in an interview that Wesley was originally intended to survive and appear in Angel season six, but he was inspired to kill Wesley off after being pitched the idea of his death scene by one of the script writers.
Wesley appears in comic books and novels based on the Buffy and Angel television series. He appears in numerous Angel novels as a member of Angel Investigations, but has a more prominent role in some; in Stranger to the Sun he falls under a mystical slumber after receiving a mysterious package in the mail and becomes trapped in a nightmare, while Book of the Dead sees his love of reading get the better of him after being sucked into a book about the occult. The comic book "Wesley: Spotlight" focuses on Wesley's struggles to save the life of Fred's love interest and (unbeknownst to Wesley) future murderer, Knox. The Lost Slayer is a series of Buffy novels set in an alternate future where Wesley is Watcher to the current Slayer, Anna.
Angel: After the Fall (2007-2011), a canonical comic book continuation of the television series, reveals that Wesley was unable to move on after his death due to the standard perpetuity clause in his Wolfram & Hart contract. Now incorporeal, Wesley acts as the last remaining link to Senior Partners, who have sent Angel and all of Los Angeles to hell as punishment for their attack in season five. Following the destruction of the Wolfram & Hart building at the hands of a now vampiric Gunn, Wesley's ghost fades away. He convinces the White Room to send him back to Hell, where his sudden appearance causes Illyria to change back and forth between Illyria and Fred's personae. When Angel is confronted by Gunn, now a deluded vampire who believes he is the champion of the Shanshu prophecy, Wesley delivers Angel a vision from the Senior Partners explaining that the prophecy has always concerned Angel. When Angel realizes that the Senior Partners need him alive for their plans, he devises a plan to get himself killed, thus forcing them to rewind time to the last moment before Los Angeles was sent to hell. However, this would not reverse Wesley's death. Wesley is resigned to his fate, believing that he has nothing more to live for now that Fred is gone, and walks away, but not before asking Spike to take care of Illyria. In the new timeline, Angel names a wing of the Los Angeles public library in memory of Wesley and Fred.
Wesley was initially designed to be a foil for the character of Rupert Giles. Actor Alexis Denisof comments that Wesley and Giles come from very similar backgrounds, but have gone in different directions "with the tools that they had"; he was conceived as a "nemesis" for Giles and Buffy. Co-executive producer Doug Petrie, who wrote Wesley's first episode "Bad Girls", explains, "The way Faith is a reflection of Buffy, Wesley takes up a lot of the space that Giles traditionally occupies." He elaborates that, because Giles is usually the "stuffy guy from England who tells you to sit up straight and obey the rules", introducing Wesley, who embodies those traits "to the nth degree", allows Giles to become "subversive" and "cool". Writer Jane Espenson claims that the character was intended for viewers to have antipathy towards, since he was trying to undermine Giles.
Alexis Denisof, who had been living in England before coming to L.A., was unaware of Buffy the Vampire Slayer since it had not yet aired in Britain. When actor Tony Head found out that Mutant Enemy were looking for an actor to play Wesley, Head contacted Denisof, an old friend from England, to ask whether he would be interested in the role. Denisof claims that Wesley was originally supposed to "come in, irritate Giles and Buffy for a couple shows, and then be gloriously terminated". However, the writers became fond of the character's "curious humour" and found themselves unable to kill him off. Joss Whedon struggled to find a place for Wesley in the series where he wouldn't clash with Giles, and eventually approached Denisof with the offer of appearing in spin-off show Angel. For Wesley to work as a long-term character, Denisof claimed they had to re-shape the character to be more sympathetic.
Wesley matures significantly over the course of both Buffy the Vampire Slayer and Angel; in his early appearances he was largely cowardly and incompetent. Alexis Denisof claims that his initial goal in playing the character was to be as annoying as possible for the other characters. He explains,
I thought that an irritating version of Giles would be annoying for [Giles] and also for Buffy. Wesley's purpose was to come there and point the finger and get things shipshape. He's a by-the-book school teacher. Considering what kind of person it would be who would have dedicated his life to this peculiar task of being a Watcher, and what would be the unique characteristics of somebody who had made those decisions, and then was taken out of that environment and put into Sunnydale. To Wesley that was a completely new and bizarre place.
During this time, Denisof came up with a background story for Wesley regarding his father to explain "why he was so repressed." The writers used this story in the show, alluding to it in early Angel episodes such as "I've Got You Under My Skin", and "Belonging". While discussing Wesley's character development over the course of Angel, Denisof explains: "I decided that Wesley was internally confronting his father and that released him a little bit and made him less repressed." Wesley is introduced in Angel having been fired from the Watcher's Council. Denisof says the experience gave the character "a little shake". He elaborates,
When he arrived in Sunnydale, he was straight out of Watcher grad school; he lacked practical experience. He was living in the ideal of the perfect way to execute his duties. I think that losing his job and going out alone roughened him up a little, lopped off some of his sharper corners. It made him more approachable and more personable, less sure of himself all the time.
Coming into the show immediately following the death of Doyle, Wesley serves as a partial replacement for that character. Comparing the two characters, Denisof states, "Wesley is a clearer counterpart to Angel, whereas Doyle had more street smarts. Although [Doyle] was struggling with his demon nature, he had seen a lot more of the world in the same way Angel had." Nonetheless Denisof believes that in this period, his character "was so anxious to be a tough rogue demon hunter but was clearly a kind of soft puppy dog." Denisof complimented the season three Angel episode "Billy", in which Wesley tries to murder Fred after becoming supernaturally misogynous, "because it was the first real dark change in Wesley to experiment with". Discussing Wesley's betrayal of his friends to protect Angel's baby, Denisof explains,
It isn't that he's purely bad or purely good, we're discovering a deeper and more complicated area of the character where good and bad aren't as clear, where Wesley does something motivated, he thinks, for the good of all – i.e. saving Connor and relieving Angel of the responsibility of murdering his son – and in doing so creates the situation in which the baby could be kidnapped, Angel loses his son and Wesley has his throat slit for the trouble. So it's grey rather than black or white.
Science fiction magazine Starburst said that "somber, subdued, bearded Wesley is worlds away from the foolish, pompous Wesley". Denisof says of the period, "It was a great opportunity to explore some of the character's darker layers. You couldn't have predicted it when he arrived in Sunnydale. This was an important element to introduce and explore, to be consistent with the show and to continue the organic exploration of all the characters." Whilst the character spent less time with his old friends, Denisof was "more or less isolated from the [main cast], barring one or two scenes of mild confrontation when they would come to visit me and we'd chew each other out. There's definitely a cold war going on with Wesley versus the world." Wesley's dark attitude is alleviated somewhat when the gang decide to take over Wolfram & Hart. The tension between Wesley and his co-workers did not go away because of the mind-wipe but because "we decided we were better off as a team than as separate entities. And we had to put our differences behind us and build our trust again as a group." Discussing the way Wesley's English accent softens over the course of Angel, Denisof says,
[The modified accent] just sits on him better. As an actor, it just felt that organically the way he was changing, and it also seemed to be accurate when you consider the amount of time he's spent in L.A. that the accent could have softened. And since he isn't surrounded by upper-crust academics as he was as a young Watcher in the Academy in England, it's understandable that he is changing the way he speaks and changing his voice, his delivery, as a result of his environment.
Denisof had earlier stated that he thought "it's better for the father [of Wesley] to be kept in the background and not become part of the story." When Wesley's father finally did appear in Angel season five, he said:
I had mixed feelings [at first]. It was a lot of pressure to have to define something that had been speculated about for many years. I was worried that by making it specific, it would lose its power, both in the mind of the character and in the minds of the audience. All my concerns disappeared as soon as I read it. There are responses to powerful figures in your life, like your parents, that you can't necessarily control. Wesley's a very controlled person on the exterior and presents a very collected persona to the people around him, being with his father he would no longer be able to control his responses. That's one of the things I wanted to explore with this, the subtle ways in which you respond to the conditioning of your parents. Wesley has difficulty around his father on a physical level, on an emotional scale, and on an intellectual scale. He is extremely intimidated by his father, and at the same time, still seeking the approval that we all essentially want from our parents when we're children. The shooting [of the cyborg Wesley believed to be his father] was an exhilarating moment in which there was the most dangerous person in his life on every level, and there is a woman he is obsessed with. And to have the woman jeopardized by something as dangerous as his father – I played that moment as a moment of pure instinct. Wesley is centered in his intellect and is more uncertain in his emotional life, but in that moment, he becomes pure instinct because he has to choose between the woman he loves and his father.
Wesley undergoes yet another drastic personality change in Angel's fifth season following the death of his love, Fred. Denisof believes that the loss of Fred caused Wesley to become understandably "unbalanced". "By the time we get to the last few episodes, he's got a handle on the grief and is functioning in a more level-headed way," says Denisof. "But underlying it is a huge hole in his heart and it makes it possible for the decision that they make in the final episode. For him emotionally, the stage is set for a life or death battle, possibly for the last time, because at this point, there's nothing more for him to lose." Denisof talked with Whedon about what storylines would have been in place had the television series received another season; Wesley would not have died, and he and Illyria would have featured in an arc in which the transformation of Illyria to Fred would have been extended over many episodes and taken to a "much deeper, darker place" than it briefly was in the late fifth-season episode, "The Girl in Question". Denisof continues,
They would have progressed the relationship between Wesley and Illyria in such a way it would conflict with his own feelings for Fred, in a much more profound way. And then we would have gone into the switching of Fred and Illyria and having these two people that he was having these strong feelings about. That was going to be a fairly long journey in the following season, all of which got abbreviated tremendously when [the WB] decided to cancel the show.
The cancellation of the show was the inspiration for Wesley's death; Whedon gave Denisof the option of keeping the character alive, but Denisof believed killing the character was right for the story, "It was very upsetting to read. It's too good a story because it hurts."