His daughter was kidnapped for political ransom; something about releasing foreign prisoners I believe.
Bartlett resigned as president and the Speaker of the House was sworn in so that any decisions made would not be made under the duress of a father protecting the life of a kidnapped daughter.
Here's a synopsis of it from their website:
In the season finale, a national crisis is thrust on the President (Martin Sheen) on the night of his daughter Zoey's graduation, forcing him to shut down Washington, D.C. as he orders the Fifth Fleet to the Persian Gulf -- all of which prompts Bartlet to consider executive action that would have been unthinkable just hours earlier. In the midst of the administration's greatest challenge, a conflicted Toby (Richard Schiff) still finds time to savor a personal milestone on the best day of his life
You'll find it here if you wish to read up on other episodes.
West Wing Episode Guide