Born the son of Robert Dundas, a Scottish merchant, and Margaret Dundas (née Watson), Dundas was enrolled at the Royal Military Academy, Woolwich. Whilst still a cadet at the Academy he spent some time with his uncle, Colonel David Watson, the Director of the Military Survey of the Highlands, where he was grounded in the arts of surveying under the tutelage of William Roy. He graduated as a lieutenant-fireworker in the Royal Artillery on 1 March 1755. He exchanged to the 56th Foot as a lieutenant on 24 January 1756, serving with this regiment during the Seven Years' War taking part in combined operations against the French ports of St. Malo and Cherbourg and fighting at the Battle of Saint Cast in September 1758. Promoted to captain on 21 March 1759, he transferred to the 15th Dragoons and fought at the Battle of Warburg in July 1760, the Battle of Kloster Kampen in October 1760 and the Battle of Villinghausen in July 1761. Dundas was also present at the fall of Havana in August 1762. He was promoted to major on 28 May 1770 and lieutenant colonel on 12 December 1775. On 31 December 1777 he was appointed Quartermaster-General in Ireland, in which post he was promoted to brevet colonel on 12 February 1782.