Several factors led to the end of Reconstruction, including the Depression of 1873 and Supreme Court rulings that severely limited the civil liberties of African-Americans. The final act that marked the end of the period was the Compromise of 1877.
Northerners became less interested in rebuilding the South as jobs became more scarce. At the same time, the Democratic Party started to gain more ground in Congress and wanted to gain control of the White House.
To try to hold onto control of the White House, the Republicans chose Rutherford B. Hayes as its candidate. He won, but there was a dispute, which led to the Compromise of 1877. The compromise led to the withdrawal of troops from the South.