Sampson first became involved in politics as a member of the Board of Selectmen for Plymouth. In 1816, he was elected as a Democratic-Republican to succeed Congressman William Baylies and represent Massachusetts's 8th congressional district in the Fifteenth and Sixteenth Congresses and served from March 4, 1817, to July 26, 1820 when he resigned due to his appointment by President James Monroe as Collector of Customs at Plymouth on July 26, 1820, and served until his death. Sampson was a close friend of Daniel Webster.
