 On returning to Kabul, Lawrence became political assistant to Sir William Hay Macnaghten, the envoy of Afghanistan, and subsequently his military secretary, a post which he kept from September 1839 to the death of his chief.On the surrender of Dost Mahomed Khan, 3 November 1840, he was placed in the charge of Lawrence until he was sent to Calcutta.In the revolution at Cabul, in November 1841, Lawrence had many narrow escapes of his life, and on the surrender of the troops, he was one of the four officers delivered up on 11 December 1841 as hostages for the performance of the stipulations.