Swails was born in Columbia, Pennsylvania on February 23, 1832. He was a boatman on the Chemung Canal in New York State until enlisting in the 54th Massachusetts Regiment during the Civil War. He rose to become the first African-American commissioned officer in the U.S. Army. After the war, Swails came to South Carolina where he was employed by the Freedman’s Bureau. Swails served as a delegate to the State Constitutional Convention in 1868. He was elected by Williamsburg County to the State Senate in 1868 and became the first African-American President Pro Tempore of the Senate in 1872, a position he held until his resignation from the Senate in 1877. While a senator, Swails began studying law and earned admission to the bar in 1872. After leaving the Senate, he practiced law in Kingstree until his death in 1900.