Hamilton was born in Scotland. Originally a merchant in Edinburgh, he was sent to East Jersey to act as an agent to recruit men to settle there. His work brought him a recommendation for becoming a member of the council of New Jersey. In March 1687, he became the deputy-governor for East Jersey on the absence of Deputy-Governor Lord Neill Campbell, who returned to England for business reasons. After Edmund Andros took control over the rest of New England, Hamilton sailed back to England to consult with the proprietaries of New Jersey. On the voyage, he was captured by the French, delaying his journey to London until May 1690. In March 1692, Hamilton was appointed governor of both West Jersey and East Jersey. During his governorship, Hamilton found that New Jersey was fraught with external and internal problems. Royal authorities attempted to remove the proprietors from power and create a large colony of New England. New York was demanding help for defense during the war with France. In addition, many of the inhabitants refused to pay the quitrents, fees on land. The Quakers in West Jersey were against providing any money to New York, since they were pacifists. Hamilton and the non-Quaker councilmen managed to acquire the necessary money. Despite this, Hamilton remained on friendly terms with the Quakers, which allowed several successful laws to pass. During his governorship, he patented the first colonial postal service. Parliament later deposed Hamilton because "no other than a natural-born subject of England could serve in any public post of trust or profit". However, after poor administration by Jeremiah Basse, he was reappointed on 19 August 1699. By then, the state government was already in a weak state, and several riots erupted in the second term as governor over tax issues. Other riots occurred because many of the settlers refused to recognize the legitimacy of the government. In 1701, he became the deputy-governor of Pennsylvania, appointed by William Penn. One of the reasons which caused Penn to return to England was the bill before the House of Lords to change proprietorship to Royal Governors. Although this was not approved, after the death of King William III, an act passed requiring Royal assent to persons named as governors. Hamilton also made preparations for organizing a defensive force in the province to assuage the group in Parliament who were questioning the fitness of the Quaker led Assembly to help defend the colonies in North America, at this time. While on a visit to New Jersey, Hamilton died on 20 April 1703.