
Hayes was born in Delaware, Ohio on October 4, 1822. He became a lawyer and was elected as the city solicitor of Cincinnati from 1858 to 1861. When the Civil War began, he left his political career to join the Union Army as an officer. Hayes was wounded five times, most seriously at the Battle of South Mountain. He earned a reputation for bravery in combat and was promoted to the rank of major general.
After the war, Hayes served in the U.S. Congress from 1865 to 1867 as a Republican. Hayes left Congress to run for Governor of Ohio and was elected to two consecutive terms, from 1868 to 1872, and then to a third term, from 1876 to 1877.
In 1876, Hayes was elected president in one of the most contentious and controversial elections in national history, one in which three states were in dispute. Hayes needed all of them to win the election. He lost the popular vote to Democrat Samuel J. Tilden but won an intensely disputed electoral college vote after a Congressional commission awarded him all twenty of the contested electoral votes. It is believed that a compromise was struck in which the Democrats acquiesced to Hayes's election and Hayes ended all federal army intervention in southern politics. That caused the collapse of Republican state governments and resulted in a solidly Democratic South.
There was one place where Hayes did send federal troops and that was to intervene in the Great Railroad Strike of 1877. He implemented modest civil service reforms that laid the groundwork for further reform in the 1880s and 1890s. He vetoed the Bland-Allison Act that would have put silver money into circulation, believing that maintenance of the gold standard was essential for economic recovery.
Hayes kept his pledge not to run for re-election. At the end of his term he retired to his home in Ohio and became an advocate of social and educational reform. He was pleased with the election of his fellow Ohioan James A. Garfield to succeed him, and he consulted with Garfield on appointments for the next administration. After Garfield's inauguration, Hayes and his family returned to Spiegel Grove. He remained a loyal Republican, but supported Grover Cleveland's views on civil service reform. He became an advocate for educational charities and for federal education subsidies. He served on the Board of Trustees of The Ohio State University, the school he helped found during his time as governor of Ohio. Hayes unsuccessfully lobbied congress to pass a bill for federal aid for education. In 1889 he gave a speech encouraging black students to apply for scholarships from the Slater Fund, one of the charities with which he was affiliated. One such student, the future civil rights leader W. E. B. Du Bois, received such a scholarship in 1892. Hayes also advocated for better prison conditions.

In 1889 his beloved wife Lucy died and Hayes was greatly saddened by the loss. After Lucy's death, Hayes's daughter, Fanny, became his traveling companion. In 1890, he chaired the Lake Mohonk Conference on "the Negro Question" where reformers gathered in upstate New York to discuss racial issues.
Hayes died of a heart attack at his home on January 17, 1893. His last words were "I know that I'm going where Lucy is."