Hanson was first settled in 1632 as the western parish of Pembroke. The town was officially incorporated in 1820, and was named for Maryland publisher of the "Federal Republican" newspaper and U.S. Senator Alexander Contee Hanson. Hanson was a champion of free speech and freedom of the press, and he was severely beaten and his newspaper offices were attacked and destroyed by an angry mob after he published an article that was critical of the administration shortly after the outbreak of the War of 1812.