Kim (Kimball O'Hara) is the orphaned son of an Irish soldier (Kimball O'Hara sr., a former colour sergeant and later an employee of an Indian railway company) and a poor Irish mother (a former nanny in a colonel's household) who have both died in poverty. Living a vagabond existence in India under British rule in the late 19th century, Kim earns his living by begging and running small errands on the streets of Lahore. He occasionally works for Mahbub Ali, a Pashtun horse trader who is one of the native operatives of the British secret service. Kim is so immersed in the local culture that few realise he is a white child, although he carries a packet of documents from his father entrusted to him by an Indian woman who cared for him.