He was on the staff of General Lafayette, became an adjutant in the Corps of Light Infantry, then transferred to the staff of George Washington.
At the age of fifteen, Harper joined a volunteer corps of Cavalry and served in the American Revolutionary Army.
Elected as a Whig to Congress serving from 1837 to 1841.
Appointed Major General of the Middlesex Militia in 1786, which he led in suppressing Shays' Rebellion.