No presidential candidate of a major party has ever died or withdrawn before a presidential election and no President-elect has ever died or withdrawn after winning the general election, but before taking office.
However, one vice-presidential candidate died after he was nominated, but before the general election, and another dropped off his party's ticket.
The procedures for finding replacements for candidate vacancies are guided by federal and state laws and party regulations. They are not exactly a patchwork, but they have evolved in response to practical problems that have arisen during the presidential elections, and in response to the growth of political parties as integral players in the election process.
In this respect, the procedures for filling vacancies in the parties' nominated tickets are like those that have evolved for the succession of the presidency when the person holding that office vacates it for one reason or another: When William Henry Harrison contracted pneumonia after giving a three-hour-long speech in the snow at his 1841 inauguration and died barely a month later, he was succeeded in office by John Tyler. It was not until confronting the issues raised in the transition of power from Harrison to Tyler that Congress thought through the rules for the succession of the President when the office is vacated during mid-term.
Election Process
The popular vote in the general election actually elects the states' electors who form the Electoral College, which, in turn, elects the president and vice-president of the United States. These electors, chosen nowadays by state party organizations, meet in each state in the middle of December to cast their votes. No Constitutional provision or federal law requires electors to vote in accordance with the popular vote in their states, but the electors are made eligible to vote by being on the slate provided by the party that won the state's popular vote.
They are generally committed to cast their votes for the winner of that popular vote although some states do not require them by law to do so. These votes are sent to Congress. The Congress meets in joint session in the House of Representatives to tally electoral votes on a date close to inauguration day. The President of the Senate certifies the outcome, and when that is done, the President and Vice-President can be sworn in soon thereafter.
The procedures for conducting the Electoral College voting were changed substantially by the 12th Amendment, adopted in 1804, so that each elector would vote twice—once for President and once for Vice-President. Before that, the Vice-President was whoever received the next highest number of electoral votes after the person who won the presidency. The earlier arrangement had created unnecessary confusion and political intrigue in the preceding elections. The new arrangement did not meet every difficulty: When no candidate receives a majority of the electoral votes, Congress has to decide the winner.
Filling a Vacancy: From the Nomination to the Electoral College Vote
Since the time of Andrew Jackson's run for the presidency in 1828, individual political parties have had the job of filling any vacancy on their national ticket, either that of their presidential or vice-presidential candidate. If one of their candidates vacates the ticket after they are nominated, either because of death or withdrawal, the party selects a replacement.
Both the Republican and the Democratic parties have rules in their bylaws governing how to fill the vacancy. The Party Chair calls a meeting of the National Committee, and the Committee members at the meeting vote to fill the vacancy on the ticket. A candidate must receive a majority of the votes to win the party's nod.
The same process would happen if the vacancy were to occur after the general election but before the Electoral College voting. If a vacancy should occur on the winning ticket, it would then be the party's responsibility to fill it and provide a candidate for whom their electors could vote.
Vacancies of Presidential Candidates
A vacancy could occur at the top of a winning ticket during the period after the electoral votes had been cast but before the President-elect had been sworn in. Perhaps the closest the country has come to confronting this was during the widespread anxiety as the 1861 inauguration of Abraham Lincoln approached, that he would be assassinated before he could take office, or that the counting of the electoral votes (at that time occurring on the morning of the inauguration, which, in those days, occurred on March 5) would be disrupted by Southern pro-slavery sympathizers, neither of which happened.
No President-elect has in fact failed to be sworn in. Nevertheless, the rules for what would happen if a President-elect were to be unavailable to be sworn in actually became a part of our law with the adoption of the 20th Amendment in 1933. This amendment was passed primarily to shorten the length of time between the general election and the beginning of the new administration (inauguration day was moved from March to January). But it also specified that if, at the time of the inauguration, the President-elect has died, then the Vice-President-elect becomes President, and if a President has not yet been qualified by that time, then the Vice-President-elect acts as President until a President has been so qualified. The concern was that, since inauguration day was moved earlier, provision had to be made to cover cases in which the Electoral College vote did not prove decisive and the winner had to be chosen through a possibly lengthy series of votes in Congress.
In the election of 1872, Horace Greeley was the Democratic nominee for President, but the Democrats lost the general election to the Republican ticket, headed by Ulysses Grant. After the popular vote, but before the Electoral College vote, Greeley died. Because the Democrats had no chance of winning the election, given the outcome of the popular vote and the number of electoral votes already secured by Grant, the party did not bother to stipulate to their electors who an official replacement candidate would be, and most of the Democratic electors in the states that the Democrats had won cast their votes for people other than whom their party had nominated.
Vacancies of Vice-Presidential Candidates
In 1912, James Sherman, the Republican candidate for Vice-President (and the incumbent Vice-President under William Howard Taft) died on October 30 of kidney disease, a few days before the general election on November 5. The Republican National Committee scheduled a meeting to be held after the general election, on November 12, to select a successor, and Sherman's name remained on the ticket for the general election. The Republicans lost, however (the Democratic ticket of Woodrow Wilson and Thomas Marshall won), and decided on November 8 not to meet as they had planned because voters only chose eight Republican electors, in Vermont and Utah. These electors did meet later, however, and, acting without instructions from the RNC, voted to replace Sherman's name on the ticket with that of Columbia University President Nicholas Butler of New York. This was a purely formal act with no practical consequences for the election.
During the 1972 presidential campaign, Democrat Thomas Eagleton was Senator George McGovern's vice-presidential running mate for only 18 days. Eagleton dropped out of the race acknowledging that he had been hospitalized three times in the 1960s for depression and stress, and that he had undergone electric shock therapy. McGovern selected the Peace Corps Director, Sargent Shriver, to replace Eagleton, but to actually place Shriver on the ticket, the Democratic National Committee met and chose him in the first week of August. The Democrats lost the general election in November to the Republican candidates, Richard Nixon and Spiro Agnew.