Both his father (John Hamm Sr.), who was a political adherent of
Caesar Rodney, and his maternal grandfather Immanuel Stout were involved in politics and government. His uncle
Jacob Stout was a one-term governor of Delaware. He first became involved in Ohio politics when the state capital was at Chillicothe, and moved with it when the capital changed to Zanesville, then moved back to Chillicothe when the state capital returned there. In October 1812, he was a member of the Ohio House of Representatives. In 1815, he was the
mayor of Zanesville. He was a member of the
Ohio Senate from October 1827 until May 1831, when he resigned to become US
Chargé d'affaires to Chile. In 1836, he was the Jeffersonian candidate for Congress from the Zanesville area. He appears to have been a member of the
Van Horne faction of the
Democratic-Republican Party. He later was head of his own faction in Ohio politics. His grandson Peter Graham "Bud" Black was the head of a faction of the Ohio Republican Party until 1948. ==Marshall of Ohio==