Robertson was born near Petersburg, Virginia. After graduating from the College of William and Mary, he emigrated to Louisiana and was appointed Territorial Attorney General by Governor William C.C. Claiborne. He was Secretary of the Orleans Territory from 1807 until 1812, at which time Louisiana became a state. He was the first United States Representative from the State of Louisiana. He served four terms as a Democratic-Republican until his resignation in 1818. He was appointed Attorney General of Louisiana from 1819-1820.
He was subsequently elected Governor of Louisiana and served from 1820 until his resignation in 1824. During his term as Governor, factional discord between established Creole citizens and newly arriving American settlers created a political crisis. Robertson was seen as weak for not acting to resolve the ethnic differences, and when he proposed moving the capital from New Orleans to Baton Rouge, riots broke out in the Crescent City and he was forced to resign. He saved face by accepting a federal judgeship and was appointed to the bench by President James Monroe.