Arriving in India in February 1867, Wyllie was promoted to lieutenant in October 1868 and joined the Indian staff corps in 1869. He was posted to the
2nd Gurkha regiment for a year. In 1870, Wyllie was selected for civil and political employment and appointed to the
Oudh commission, serving under General Barrow and
Sir George Couper. Wyllie was promoted to captain in October 1878 and transferred to the foreign department in January 1879, serving as cantonment magistrate of
Nasirabad, assistant commissioner in
Ajmer-Merwara, and subsequently as the assistant to Sir
Robert Groves Sandeman, the governor-general's agent in
Baluchistan. He was part of Major-General Sir
Robert Phayre's contingent in the
Second Anglo-Afghan War, when his actions earned him mentions in the Viceroy's dispatches. After the war, Wyllie was appointed the military secretary to the governor of
Madras,
William Patrick Adam (later also his brother-in-law) from December 1880 until Adam's death in the following May. On 29 December 1881, Wyllie married Katharine Georgiana Carmichael (15 July 1858 — 9 September 1931), second daughter of David Fremantle Carmichael of the Indian Civil Service. Made CIE in 1881, he was promoted to major in October 1886 and to lieutenant-colonel in 1892. Wyllie served as the private secretary to acting governor
William Huddleston till November 1881, subsequently overseeing the affairs of
Malhar Rao Gaekwar of
Baroda before taking the post of the assistant resident at
Hyderabad from December 1881 to November 1882. Through the next 14 years, Wyllie served in political and government posts in a number of different places, mostly in
Rajputana . During this time he oversaw relief for
the famine of 1899-1900. In between 1893 and 1899, Wyllie was the officiating resident in Nepal when in February 1898 he was selected as the agent to the governor-general in central India. In May 1900 he was transferred in the same capacity to
Rajputana, where he remained for the rest of his service in India. ==Return to England==