Barnwell was born in Beaufort in the Province of South Carolina. His education was by a private tutor after he had exhausted the resources of the Beaufort common school. But he interrupted this and entered the revolutionary war at the age of 16 as a private in the militia.[2] In the maneuvering after the Battle of Stono Ferry, his company was camped on Johns Island in late June 1779. A British surprise attack at night cut them up badly in an action known as the Battle of Mathews' Plantation. The sixteen-year-old Barnwell was wounded so badly that they stripped his gear and left him for dead. He was found in the field by a slave and taken to his aunt (Mrs. Sarah Gibbes) on her nearby plantation. She and her daughter nursed him back to health.
Revolutionary War
He returned to duty, rejoining the militia the next spring as a lieutenant. He was just in time to be included with the prisoners when General Benjamin Lincoln surrendered Charleston on May 12, 1780. He was imprisoned on the transport ship Pack Horse until his exchange in June 1781. He returned to militia service, and by the end of the war had risen to lieutenant colonel.
Political career
Back home in Beaufort, Barnwell was elected to the South Carolina house of representatives for 1787-1788. He was a delegate representing South Carolina in the Confederation Congress in 1788 and 1789. He was returned to the state house for terms in 1790-1791, and 1794–1801, and in 1795, he served as speaker of that house.[2]
In the spring of 1788, Robert was a delegate to South Carolina convention that ratified the United States Constitution. He was elected to one term in the U.S. House (1791–1793) for an at-large seat but declined to run again. Beginning in 1795, he was the chair of the board of trustees for the new Beaufort College and held that position for many years. He was elected to the state senate for 1805–1806 and was president of that body in 1805.