[2][4] From August 1889 Lyall spent some time working as home secretary in the Raj government, and was also tasked with an investigation of the penal settlement at Port Blair.
[2][4] He and A. S. Lethbridge, a surgeon in the British administration, concluded that the punishment of transportation to the Andaman Islands was failing to achieve the purpose intended and that indeed criminals preferred to go there rather than be incarcerated in Indian jails.
"[6] He was formally appointed as home secretary on a permanent basis in November 1890 and was the acting Chief Commissioner of Assam between July and October 1894.
He had demonstrated a gift for Hebrew while at university and he went on to learn Arabic, Hindustani and Persian, as well as sufficient of what was then called the Mikir language to enable him to translate some folktales that had been collected by Edward Stack.
The Oxford Dictionary of National Biography says that he was "one of Britain's foremost scholars of Eastern languages" and that His translations were particularly successful in combining an accurate rendering with a poetical diction which imitated more or less the metres of the originals, although usually without any attempt at rhyme.
[3][8] Lyall was elected a Fellow of the British Academy,[8] of the University of Calcutta and of King's College, London, as well as being a vice-president of the Royal Asiatic Society and an official representative of the government of India at various international oriental congresses between 1899 and 1908.