Williamson was born about 1775. He entered the Royal Military Academy at Woolwich on 8 August 1791, and received a commission as second lieutenant in the Royal Artillery on 1 January 1794. He was promoted to lieutenant, on 11 March 1794. In June 1795, he served on the coast of France, in the expedition to Quiberon Bay to assist the French royalists. In 1799, he went to the Cape of Good Hope and served in the First Cape Frontier War of that year. That year, he was gazetted captain-lieutenant, on 12 October.