Khiva is a town in the western province of Khorezm in the Republic of Uzbekistan. Along with Samarkand and Bukhara to Kiva’s south, the town is an important and often overlooked historical site on what was once the Great Silk Road. Up to 1873, Khiva was the capital of the Khanate of Khiva surrounding the Aral Sea and abutting on the Caspian Sea.
In the early decades of the 19th century, the sultanate was raiding for slaves in Imperial Russia. The Russians did the same in the Khanate. Eventually, the Russians took this situation as an excuse to take control of the state and sent General V.A. Perovsky, the commander of the Orenburg garrison, with 5,200 infantry and ten thousand camels. Due to poor planning and a bit of bad luck, they set off in November 1839, into one of the worst winters in memory, and were forced to turn back.
The British meanwhile were on the way to Kabul, arguing i. a. that they were moving past the Khyber Pass to stop the Russians from (ultimately) invading India. A handful of British officers rode to Herat to strengthen the hand of the local Wazir against the aggressive Persians.
From Herat, Lieutenant Richmond Shakespear, an artillery officer, joined a party of traders trekking to Khiva over dry and barren country. The heat was stifling, the grass for the horses and camels indifferent, and the water bad and scarce. They took 25 days to cover the 1120 km. In Khiva, Shakespear spent over two months single-handedly convincing the Khan to release the prisoners. In the end, he convinced the Khan to free all Russian subjects under his control, and also to make the ownership of Russian slaves a crime punishable by death. With this, he led the party of Russians to Fort Alexandrovsk, 800 km away. Women rode camels; children crouched in baskets hung over the sides of the animals, and the men walked – 355 in all.
Having delivered the Russians, (by then Captain) Shakespear rounded up the 640 Khivan prisoners and sent them on their way home. He then proceeded to St. Petersburg to seal the deal – and permanently stop the Russians from moving on Khiva (they destroyed the Khanate in 1873 – a generation later).
Knighted in London, Sir Shakespear was back in India just in time to participate in the second Afghan war in 1842. In Kabul, he heard of about 100 British prisoners kept in Bamian. The sooltan was just about to put all of them, including women and children, on the slave market. With a trusted party of Kuzzibash horsemen, he went and rescued them.
Sir Richmond Shakespear was then just over 29 years old.
 Captain Abbott had reached Khiva ahead of Shakespear and failed in convincing the Khan. He was kidnapped by bandits on his way to Russia. It is not clear whether he returned to Kiva to second Shakespear, or whether he had reached Russia separately.
 Source: Ferdinand MOUNT (2015): The tears of the Rajas. Mutiny, Money and marriage in India 1805 – 1905. Simon & Schuster, New Delhi, pg. 314 ff.