 During the War of 1812, he was commissioned a captain to the 10th Infantry Regiment and was later promoted to major in the 13th and 18th Infantry Regiments.After the war, he was reduced back to a captain and eventually resigned from his commission on May 15, 1815.Nelson was elected a Democratic-Republican to the United States House of Representatives to fill a vacancy in 1816, serving until 1819.