Born and educated in Georgia, he moved to Oxford, Mississippi to establish a legal practice. He was elected to the United States House of Representatives in 1856 and served until December 1860, when he helped draft Mississippi's Ordinance of Secession. He helped raise the 19th Mississippi Infantry Regiment and worked on the staff of his wife's cousin, General James Longstreet. In 1862, Confederate President Jefferson Davis appointed Lamar to the position of Confederate minister to Russia. Following the Civil War, Lamar taught at the University of Mississippi and was a delegate to several state constitutional conventions.