Quick Summary
Rutherford B. Hayes (VP: William Wheeler) beat Samuel Tilden (VP: Thomas Hendricks) in a controversial election. Tilden won the popular vote, and the electoral votes were disputed. So an informal deal was struck: The Compromise of 1877, which made Hayes president and withdrew troops from the south, ending Reconstruction. In addition, he promised to not run for reelection.
Background
After the civil war, the United States was entered into a period of rebuilding and rejoining the Confederate states back into the Union, called Reconstruction. During that time, the United States was trying to integrate the states back into the Republican government. So, they granted African Americans their rights with the 13rd, 14th, and 15th amendments.
After a presidency plagued with economic problems and numerous major scandals, people still expected Ulysses S. Grant to run for re-election, his would-be third term. Although George Washington set the precedent for two terms, Ulysses S. Grant was only 54 years old, by far the youngest president after two terms at the time (2nd was Washington, who finished his two terms at 65).
Primaries
Republicans
In the beginning, James Blaine, the former Speaker of the House from Maine was the leader and was thought to be nominated. On the first ballot, he almost had enough votes for a majority. While he was slipping in the polls, Rutherford B. Hayes was on the rise, and he ended up being nominated, with William Wheeler being nominated for vice president.
Democrats
The Democratic ballot was much more straight forward, during the first ballot, Samuel Tilden, the former governor of New York, received over 400 votes in the first poll, and he was quickly nominated. Previously, Tilden had prosecuted Tammany Hall and sent Boss Tweed to jail, so the current head of Tammany Hall, "Honest John" Kelly, strongly opposed Tilden, but he still was able to be nominated. His vice-presidential nominee, Thomas Hendricks, was easily nominated, as he was the only person put forward to be vice president.
General Election
During the election, both parties ran trash-talking campaigns. The Republicans attacked the Democrats' involvement in the Civil War, while the Democrats brought up the corrupt presidency of Ulysses S. Grant. Right before the election, Colorado became a state, and they couldn't organize a presidential election in the state, so the state electors gave three votes to Rutherford Hayes.
In the first count of the votes, Samuel Tilden had 184 electoral votes, while Hayes had 165. There were four states that had electoral votes that were in question.
Oregon (1 vote)
In Oregon, there was one elector, postmaster John Watts, who was ineligible to be the elector. The Democratic governor, La Fayette Grover, replaced the elector with a Democratic elector. So there were supposed to be two Republican votes and one Democratic vote, however the Republican electors already submitted their three votes for Hayes.
Louisiana (8 votes)
In Louisiana, unofficial tallies said that Tilden won by over 6,000 votes. The republican government disregarded the vote from several areas, citing fraud. They threw out 15,000 votes, 12,000 of which were for Tilden. In the end, Hayes won the state, but the Democrats stated that Tilden won the state.
Florida (4 votes)
An initial count had Hayes ahead by 43 votes, but after a correction, Tilden would be ahead by 94 votes. Once again, the election board disallowed many ballots, giving Hayes the win by a few thousand. They also declared that a Republican became the governor, but the Florida Supreme Court overruled that.
South Carolina (7 votes)
Initially, the Republicans said Hayes won, but the Democrats said Tilden won. It was very similar to what happened in Louisiana.
So, on December 6, 1876, two sets of results from those four states were sent to Washington, and the government faced a crisis, and the Constitution didn't have an explicit method in dealing with these kinds of controversies.
Electoral Commission Act
In December, both houses of Congress agreed that there should be some sort of an Electoral Commission. It passed in both the House and Senate and Ulysses S. Grant signed it into law. The Electoral Commission would be made up of fifteen members: five from the House of Representatives, five from the Senate, and five from the Supreme Court. In total there were eight Republicans and seven Democrats. There were supposed to be seven of both, and one independent, but the independent, Associate Justice David Davis resigned before the Electoral Commission so he could take a seat in the Senate.
The Electoral Commission held its meetings in the Supreme Court building. It was essentially a court hearing. It heard statements form the Republicans and Democrats. Tilden was represented by Jeremiah Black, Montgomery Blair, and others, while Hayes was represented by William Evarts, his future Secretary of State, and others. The commission voted 8-7 in favor of Hayes, awarding all twenty of the electoral votes to Hayes.
This was rejected by the House of Representatives but upheld by the Senate, so Hayes' presidency was assured. Now, something interesting was happening. Democrats kept making filibusters, so supposedly, an informal deal was struck that stopped the filibusters.
Compromise of 1877
It is debated whether this actually occurred or not, but supposedly, an informal, spoken deal that stopped the filibusters, took the troops out of the South, ending reconstruction, and granting Hayes the presidency. Hayes promised to only serve one term. It made both sides happy, with the Republicans getting in the White House, while the Democrats, centered in the South, were content with Reconstruction ending.
Aftermath
Hayes' presidency was tainted with the controversial election. He was dubbed "Rutherfraud", "His Accidency", and "His Fraudulency". Recall William Evarts, his lawyer in the Electoral Commission. He was appointed to be the Secretary of State, while another one of his attorneys, Stanley Matthews, was appointed to the Supreme Court. The scandal was investigated and neither Hayes nor Tilden were found of doing anything wrong.
Overall, the Election of 1876 was one of the most controversial in American history, and Hayes' presidency and reputation was tarnished by the disputed election.