Hamilton started his footballing career with local side Elgin City in the Highland League. He relocated to Glasgow in 1896 to attend the city's University, and joined Queen's Park. A year later he joined Rangers where he remained until 1907, earning a reputation as a potent goal-scorer who was particularly accurate from long range. Hamilton played every match, was top scorer and captained the team during the 1898–99 season, in which they won every league match. He earned further League winners medals in 1899–00, 1900–01 and 1901–02 and was part of Rangers' Scottish Cup-winning sides in 1898 and 1903. He became Rangers all-time top scorer against rivals Celtic during his time at Ibrox, was the club's top goalscorer for nine consecutive seasons and the highest overall in Scottish League Division One on six occasions, his highest total being 28 from 24 appearances in 1903-04. Hamilton moved south of the border to join Fulham in May 1906, helping them to win the 1906–07Southern League title, before returning to Rangers a year later. He left the Govan club for a second time in 1908, briefly moving to Heart of Midlothian before joining Morton. He signed for Dundee at the end of the 1909–10 season to late to be involved in the side which defeated Clyde to win the Scottish Cup, Dundee's first, that year. After three full seasons and part of a fourth at Dens Park, he returned to first club Elgin City in 1913 where he finally retired.
International
Hamilton won a total of eleven caps for Scotland between 1899 and 1911, scoring fifteen goals, four of which came in Scotland's 11–0 win over Ireland in 1901, their biggest ever margin of victory. He was also selected seven times for the Scottish Leaguerepresentative side, scoring nine goals.
Post football
After retiring from football Hamilton went into education, and after graduating from the University of Glasgow he became a school teacher then eventually master. He maintained an involvement in education throughout his life and eventually served upon the Moray and Nairn Education Board in the mid-1930s. He was also involved in local politics, serving in the Elgin Town council between 1914 and 1937. For the last six years of this period he held the position of Town Provost. Hamilton died in May 1948, aged 71. In the late 1950s/early 1960s a new road in a private housing estate overlooking the River Lossie at the north side of Elgin was named after him as Hamilton Drive, which still remains today.