He graduated from the College of William and Mary in 1811 and was admitted to the bar in 1813, starting practice in Frederick.
He held several local offices before being elected to the United States House of Representatives representing Maryland"s 4th district. He served only one term, March 4, 1821, to March 3, 1823, and was not a candidate for reelection. Nelson received an Master of Arts degree from Princeton University in 1825.
In 1831, he was appointed Chargé d"affaires to the Two Sicilies, a position he served in from 1831 to 1832.
President John Tyler appointed him Attorney General of the United States on July 1, 1843, which he served until the end of the Tyler administration. He also served as United States Secretary of State ad interim for about a month in 1844 after the sudden death of the previous Secretary of State Abel P. Upshur.
Nelson retired from public life and died in Baltimore, Maryland, on January 8, 1860.