From 1898 to 1902, during the crucial period of the Second Boer War, he was the Republic's special envoy and minister plenipotentiary in Brussels, accredited to several European states.
He was recommended for the position of state attorney of the South African Republic to its president, Paul Kruger, by some of his previous lecturers.
As state attorney of the Transvaal, Leyds was tasked with judicial cases of the republic, as well as the founding of the promising Netherlands–South African Railway Company.
He was succeeded in that capacity by Francis William Reitz, and returned to Europe to serve as envoy of the South African Republic in Brussels.
Former Boer general and South African Prime Minister Jan Smuts described Leyds as the most significant figure in the history of Transvaal, second only to Kruger.