Joseph Hayne Rainey (June 21, 1832 – August 1, 1887) was an American politician. He was the first African American to serve in the United States House of Representatives, the second black person to serve in the United States Congress (U.S. Senator Hiram Revels was the first), and the first black presiding officer of the House of Representatives. Born into slavery in South Carolina, he was freed in the 1840s by his father purchasing the freedom of his entire family and himself. Revels and Rainey were both members of the Republican Party.
In 1870, Rainey was elected to the State Senate of South Carolina and became chair of the Finance Committee. He served only a short time as that year he won a special election as a Republican to fill a vacancy in the Forty-first Congress of the United States. This vacancy had been created when the House refused to seat Benjamin F. Whittemore, the incumbent. He had been censured by the House for corruption but re-elected.
Rainey was seated December 12, 1870 and was re-elected to Congress, serving a total of four terms. Serving until March 3, 1879, he established a record of length of service for a black Congressman that was not surpassed until that of William L. Dawson of Chicago in the 1950s. He supported legislation that became known as the Enforcement Acts, to suppress the violent activities of the Ku Klux Klan.