Anderson was born in Louisville, Kentucky, to a prominent family; his father was an aide to the Marquis de Lafayette during the American Revolution. Anderson graduated from Miami University in 1833, studied law and was admitted to the Ohio bar. He moved to Dayton, Ohio, where he began a law practice and was later elected county prosecutor.
In 1844, Anderson was elected to the Ohio Senate and made a name for himself as an advocate for black rights. He then moved to Texas for health reasons. He gave an impassioned speech in San Antonio in December 1860, strongly opposing secession and calling for the "perpetuity of the national Union." Angry local pro-Confederates threatened Anderson and arrested him without charge, but Anderson escaped and returned with his family to Dayton.
President Abraham Lincoln sent Anderson on a pro-Union speaking tour of Europe, after which Anderson accepted command of the 93rd Ohio Infantry and was commissioned in the Union Army as a colonel. Badly wounded at the Battle of Stones River, Anderson resigned his commission and returned to Ohio to recuperate.
Anderson was elected the seventh Lieutenant Governor of Ohio in late 1863 and took office the following year. On August 29, 1865, he became governor upon the death of Governor John Brough.
Anderson served less than five months, until January 8, 1866. Ohio historian Dwight L. Smith wrote that his brief term in office was "uneventful... [and] the services he performed were merely routine."
After leaving the governorship, Anderson resumed his legal practice and moved back to Kentucky, where he died at the age of 81.
Anderson is interred at Kuttawa Cemetery in Kuttawa, Kentucky.
Anderson's brother, Major Robert Anderson, was also a United States Army officer, notable for his defense of Fort Sumter at the outset of the American Civil War. Another brother, William Marshall Anderson, was a noted explorer, politician, and briefly a member of the New Virginia Colony of ex-Confederates in Mexico during the reign of Emperor Maximilian. (Note: Rev. William C. Anderson, who served as President of Miami University from 1849 to 1854, is sometimes erroneously cited as an Anderson brother.)