The seventh and final season of the American political drama television series The West Wing aired in the United States on NBC from September 25, 2005 to May 14, 2006 and consisted of 22 episodes. The series changed time slots from Wednesdays at 8:00 pm to Sundays at 8:00 pm, and the series struggled in its new time slot against ABC's Extreme Makeover: Home Edition and CBS's Cold Case.[1][2]

PopMatters said the final season "recovered its sense of humor".[42] David Hinckley of the Daily News praised the character of Bruno Gianelli as a "brilliant (...) shark of a campaign manager" and commended the series for never rushing the romantic character arc of Josh and Donna.[22] As the fictional Election Day approached, Aleksandra Stankovic of the The Harvard Crimson said that "a more complex, more mature West Wing, but one with no clear narrative resolution in sight" was evolving and that she welcomed the "restoration of narrative tension".[43] Bill Brioux from the Toronto Sun agreed, stating that the seventh series was "enjoying a creative renaissance" and had been "enlivened by the election storyline".[44] Mike Duffy of the Detroit Free Press said that The West Wing had "rediscovered the vivid political zing in its farewell season";[45] however, Jeffrey Robinson from DVD Talk commented that the shift away from daily issues and operations in the White House meant "season seven did not feel like The West Wing".[46]

One episode, "The Debate", was aired as live television. Rob Owen of the Pittsburgh Post-Gazette said "real-life issues were brought to a prime-time national audience" but the first half was "boring back-and-forth [with] not much revealed about the characters" and had it not been live it could have been "stronger, better produced and with a less dull first half".[47] Janet Daley of The Daily Telegraph called the episode "riveting, and astonishingly brave" with "dazzling exposition of the central political argument of our time: whether free markets deliver better life chances, and a more virtuous society, than economies controlled by government."[48]

Despite slipping ratings and a fear the show would be axed, NBC announced in March 2005 that The West Wing would be returning for a seventh season.[49] The change from Wednesdays to Sundays cost the show approximately 30 percent of its audience;[44] the first two episodes of the season garnered the series lowest ever ratings and Deseret News said the move of time slot sealed the show's fate.[50][51] In January 2006, it was announced that the seventh would be the final season. Kevin Reilly, entertainment president for NBC, said that after poor viewing figures for the "last couple of seasons [they reached] a point where you look at the ratings and you just say, 'it's time.'"[52]

The seventh and final season mainly follows Santos and Vinick on the campaign trail, while also addressing the aftermath of the shuttle leak investigation. The Bartlet administration's last year in office is featured, but not prominently. Toby admits to leaking the story about a military spacecraft and President Bartlet is forced to fire him. Later, he refuses to name his recently deceased brother as the source of the classified information, despite being urged to by both his lawyer and a federal prosecutor, as he feels it would be wrong to dishonor his memory. Also, C.J.'s tenure as Chief of Staff becomes more stressful as she deals with the war between Russia and China over Kazakhstan. The presidential race tightens up when Vinick makes a number of mistakes on the campaign trail. Leo suffers a heart attack, and dies on the night of the election, which Santos eventually wins. The last few episodes show the last days of the Bartlet administration and Santos' transition; in the series finale, Santos is sworn in as President.

The season opener starts with a scene from three years in the future; a reunion of main characters at the opening of Bartlet's Presidential library and Josh introducing the President of the United States...who is not seen as the credits start. Of note, the intro reveals that C.J. and Danny are together and have had a baby, Will Bailey is now a Congressman, and Kate Harper has written a book; Toby Ziegler is also present and received warmly by President Bartlet. Leo McGarry is not present at the reunion; coincidentally actor John Spencer died three months after the airing of this episode. The show then returns to the main timeline with the Santos/McGarry campaign getting off to a rough start with tensions between Santos and Leo and between the campaign and the White House, despite poll numbers which show the campaign doing better than expected. C.J. is questioned by the White House counsel as to her involvement with the leak about a secret military space shuttle.

The Santos campaign takes a media hit on security issues because of the Bartlet administration's handling of the leak investigation. A White House reporter, Greg Brock, is sent to jail for failing to disclose his sources, and Josh clashes both with the White House and with a new communications director (Janeane Garofalo). The campaign debates whether Santos should respond to a summons to a weekend of military reserve training.

The episode follows the ups and downs of the Vinick campaign as Santos gains momentum on national security, then loses momentum as Vinick presses him on immigration issues, although this prompts the resignation of a top Vinick aide. The religious right tries to corner Vinick into promising to appoint pro-life judges, although Vinick's deception to appease them backfires before Governor Sullivan saves the day.

The Santos campaign's "education week" is derailed by a controversy over teaching intelligent design, however, the Santos campaign turns the issue around, playing off Vinick's vulnerability as a pro-choice Republican on religious issues. In the White House, subpoenas are being handed down, and Palestinian Chairman Farad is murdered by a suicide bomber. As Bartlet is determined to attend the funeral despite security concerns, C.J. is hounded by a lone intelligence agent who believes Farad's death was part of a larger conspiracy, and then finds out another foreign leader has also been assassinated. In the closing moments of the episode, Toby reveals to C.J. that he was responsible for the security leak.

C.J. deals with the immediate repercussions of Toby's confession, and White House Counsel Oliver Babish questions Toby until his lawyer intervenes. Josh struggles with the necessity to "clean house" on the Santos campaign, firing dozens of inexperienced staffers, including one close to the candidate. Kate Harper tangles with both the National Security Council and intelligence agent Frost as tensions rise between Russia and China. Ellie Bartlet reveals that she is engaged and lets her parents know she should get married very soon because otherwise she'll be a visibly pregnant bride. The president fires Toby and addresses the nation as Toby is led from the White House.

An ad by a 527 group attacking Santos for his pro-choice stand has both campaigns up in arms, trying to avoid the campaign going negative or diving into the abortion issue — a touchy subject for both candidates: Vinick because his pro-choice position risks alienating pro-life conservatives, Santos because it risks alienating pro-choice liberals, including a major pro-choice interest group who are considering endorsing Vinick. Back at the White House, Will struggles with dealing with the press as the new Communications Director, settling into Toby's old office. Josh struggles with Lou Thornton's decision to bring Donna into the campaign as a spokesperson. In the final moments, as both candidates wait backstage at the Alfred E. Smith Memorial Foundation Dinner, Santos and Vinick agree to an unexpected deal: a live debate the following Sunday.

Candidates Matthew Santos and Arnold Vinick debate live in a forum moderated by Forrest Sawyer. During Vinick's opening statement, he proposes dropping the negotiated rules and having a freer debate format. During the hour-long debate (originally broadcast live in two tapings for East and West Coast audiences), the two candidates cover topics ranging from immigration to job creation to health care to African debt relief.

Santos must face the challenge of visiting a black family in Los Angeles whose child was shot by a Latino police officer. C.J. must manage a crisis between China and Kazakhstan. And Will must go through Ellie's wedding guest list in a painful, protracted negotiation.

Wedding plans for the Bartlets' daughter move forward as Josh tries to pay for a windfall in the polls with a dwindling campaign war chest. Meanwhile the president must balance his daughter's most important day with a potential war between two nuclear powers. Democratic Party leaders want Leo to be campaign manager rather than Josh, but Josh has the trust of Leo and that carries through to Santos.

At the beginning of the episode, Martin Sheen directly addresses the viewers out of character to pay tribute to co-star John Spencer, who played Leo and had recently died when this episode was originally broadcast. In the episode, Leo does poorly in Vice Presidential debate practice, making Lou and Josh nervous, and the media catches wind. Will and Kate set up a date, which turns out to be watching the VP debate in Will's office. Santos takes time off from the campaign trail to visit his family, finding himself out-of-sync with domestic issues amid a flurry of invasive media coverage. Josh calls Toby, who is currently between arraignments, about the VP debate. In the end, Leo performs unexpectedly well, and reveals he leaked stories of his poor practice sessions to lower expectations.

C.J. realizes that she barely has any time left in office and decides to try to solve the (real world) crisis in Darfur, Sudan along with the (fictional) crisis between Russia and China over Kazakhstan. Adding more to her stress level, the President's son-in-law, Doug Westin, is rumored to be having an affair with his kids' nanny; Danny makes his first appearance (outside of the season opener flash forward) since the fifth season to go on a date with C.J.

Elections are underway in Kazakhstan, but Russia and China teetering on the brink of an oil war in Central Asia is the least of Bartlet and C.J.'s concerns as they face a nuclear reactor in California on the verge of a meltdown. While agonizing over whether to evacuate nearby citizens and to release radioactive steam into the atmosphere, the Santos and Vinick campaigns stare each other down, trying to avoid being the first to turn the crisis into a political issue – all the more complex as, decades ago, Vinick lobbied for the plant's construction. When the news comes out, the election becomes, in Josh's words, "too close to call."

When new polling puts Santos and Vinick neck-and-neck nationwide, the Santos campaign staff are elated – Josh and Donna so much so that they end up sharing a kiss, which forces them to confront their feelings for each other. Vinick, on the other hand, has a cold, and is feeling pressure from the RNC to make a rightward turn in his campaign and play to the Republican base. This makes Bruno nervous, as he's afraid he's going to be fired. And at the White House, President Bartlet summons both candidates to the White House so he can advise them that he's ordering tens of thousands of U.S. troops into Kazakhstan. But before he meets with either Presidential candidate, he meets with Leo McGarry, whom he has also called to the White House. Bartlet's meeting with Leo is more personal as he shares his concerns about the consequences of his decisions with Leo back in his old role as the President's closest confidant. This scene would be John Spencer's last appearance.

With the election two weeks out and both candidates polling even in California, both the Santos and Vinick campaigns scramble to the state to try to gain free media from public events. Vinick, whose hand is broken by constant handshakes, has a stroke of luck when Bruno discovers Santos' briefcase in a holding room. Vinick and Bruno must make a difficult decision: do they open the case and use its contents against Santos, or take the high road and return it? The briefcase contains evidence that suggests that the Congressman may be supporting an illegitimate child. Vinick asks to meet with Santos, whereupon the Congressman denies the allegation, saying that he is making up for the mistakes of his brother.

It's 5 days 'til the election – Halloween – and the Santos campaign's stress level rises as they kick off a whirlwind tour of battleground states, with Jon Bon Jovi along for the ride. Among the crises of the day: Helen Santos makes provocative statements about felons voting, Donna can't work out a sketch for The Tonight Show, Santos is irked that his security briefings are cut short, and Josh is receiving campaign tips from Toby – who is himself facing a federal prosecutor that threatens new indictments which could derail the Santos campaign. Toby gets a brief respite from visits to the prosecutor's office to see his kids (Molly and Huck) and his ex-wife, Andie, who urges Toby to blame his late brother for the sake of their children. It is implied that Andie was the leak to Toby, and that Toby's late brother should take the fall instead of the Congresswoman.

The episode opens late at night on the day before election day. Josh finally relaxes long enough to see various campaign staff hooking up, and he and Donna sleep together – twice. Election day brings stress in both campaigns, Josh is convinced he is finding problems in exit poll data while the Vinick campaign worries the data shows them losing in key places. West Virginia is unexpectedly called for Vinick and the traditionally Republican South Carolina is called for Santos. The episode closes with Annabeth finding Leo in his room, her screaming for help, and Secret Service agents closing in calling over their radio, "He's down, he's down!"

During an exhausting and adrenalin-filled night, the electoral votes come in as the Santos and Vinick campaigns wait anxiously. C.J. breaks Leo's death to President Bartlet, and the news hits the airwaves less than an hour before polls close on the West Coast. After Santos and Vinick win their home states of Texas and California, respectively, the two campaigns agonize over whether to mount legal challenges before final results are announced in Nevada and Oregon. In the end, both states break for Santos, who gives his election night speech as the new President-elect.

Leo's funeral brings back fond memories and old friends, including Amy Gardner, who urges Josh to consider appointing a Congresswoman from Florida Vice President; Ainsley Hayes, who approaches C.J. about a job in the Santos administration; Danny Concannon, who tries to rekindle his relationship with C.J.; and Bob Russell, who offers himself as a Vice Presidential prospect. Meanwhile, Santos and Josh clash over Barry Goodwin's place in the transition, Santos eyes numerous Speaker of the House candidates, and Bartlet and the staff reminisce about Leo in the Residence.

Josh's astoundingly hectic schedule begins to catch up to him, and friends and co-workers worry that if he doesn't take some time off very soon, he won't be able to function as chief of staff in the long run. Meanwhile, Josh has his hands full, acting as liaison between the President-Elect and the White House, and trying to staff the West Wing for the new administration. The top of his list is former Deputy Communications Director Sam Seaborn (Rob Lowe), who is reluctant to leave his happy life working in the private sector. Sam decides to stay on condition that Josh takes a week's vacation. In the end, Josh flies off with Donna who had given Josh an ultimatum to define their relationship. Meanwhile, Santos enrages C.J. by undermining Bartlet's military agenda with a phone call to the President of China (though he has a secret valid reason for doing so).

The transition is speeding ahead, and Matt and Helen Santos are overwhelmed by almost everything about their new lives – including Secret Service protection, choosing a DC school for their kids, and dealing with the White House household staff. Vinick has too much time on his hands, and his staffers come to realize he's plotting another run for the presidency. Santos is trying to figure out how to get his vice-presidential choice confirmed, and makes a surprising offer to Vinick: be the new administration's Secretary of State.

The episode is set two weeks before the inauguration and the Bartlet administration staff is preparing to leave the White House. Most are seeking jobs in the Santos administration or elsewhere. C.J. is offered two jobs she is interested in - one to manage a philanthropic foundation and one as a high-ranking counselor in the Santos administration. C.J.'s relationship with Danny is suffering because he feels she is not taking it seriously. C.J. also visits Toby for the first time since his dismissal and considers whether she should urge President Bartlet to pardon him before leaving office. Will Bailey is offered a job with the DCCC to help get Democrats elected but finds himself becoming interested in one apparently unwinnable Congressional seat in Oregon.

President Santos is inaugurated and President Bartlet leaves office. It is revealed that Santos plans to try to make Governor Eric Baker the vice-president through the Twenty-fifth Amendment and Bartlet pardons Toby in the last hours of his presidency.

The DVD release of season seven was released by Warner Bros. first in the UK on September 11, 2006 and then in the US on November 7, 2006 after the season had completed broadcasting on television. As well as every episode from the season, the DVD release features bonus material including a two featurettes on "The Debate" – an episode that was broadcast live. Two live episodes of "The Debate" were produced, one for the East Coast and another for the West Coast.[75] The West Coast version of "The Debate" is the one used on the DVD.[76]