He studied law and was admitted to the bar in 1799.
After practicing law and serving as a clerk and master in equity, Stanly was elected to the North Carolina House of Commons in 1798 and 1799. In 1800, Stanly was elected as a Federalist to the 7th United States Congress (March 4, 1801 – March 3, 1803). He served again in the 11th Congress (March 4, 1809 – March 3, 1811) before returning to the practice of law.
Stanly returned to the state house for several more terms, in 1812–1815, 1818–1819, and 1823–1825.
He died in New Bern in 1834 and is buried in the Cedar Grove Cemetery. He is also known for killing Richard Dobbs Spaight, a signer of the Constitution, in a famous duel in 1802.
As a result of the duel, North Carolina outlawed duelling in the state. Stanly County, North Carolina was formed in 1841, and named in his honor.
Member North Carolina House Member United States House