In 1790 Wylie was invited to Russia by Dr John Rogerson (1740—1828), from Dumfries, who was a court physician to Catherine the Great. He entered the Russian service as senior surgeon in the Eletsky Infantry Regiment. Wylie was surprised that only officers received medical assistance and other ranks were thus succumbing to infections or malaria. Wylie participated in the Polish–Russian War of 1792 and in military operations against the Kościuszko Uprising, culminated in the Battle of Praga, as battlefield surgeon. And on 12 January 1793, Wylie (known in Russia as Yakov Viliye) was given a special commendation for his treatment of the (malaria) fever "with great success using the pharmaceutical he himself had invented and named Solution Mineralis," which contained small below toxic doses or arsenic. He also performed amazing surgery removing a bullet from a soldier's spine. In 1794 he was promoted to staff surgeon.