Ashton Pelham-Martyn is born in a Himalayan mountain pass, the son of a British professor exploring India.  Following the deaths of his parents, Ash is left an orphan at the age of five.  Sita, the wife of his father's groom, promises to take Ash to his own people at the British cantonment in Delhi. Unfortunately, however, they become caught up in the Indian Mutiny of 1857. India is no longer a safe place for a British child.

Forced to change their plans, Sita and Ash flee to safety in the Palace of the Winds in the northern principality of Gulkote.  Sita tells Ash this will only be a temporary measure, and eventually the two of them will leave the palace and settle in their own secret valley in the mountains.  Gradually, Ash forgets his real parents and is raised by Sita as an Indian and a Hindu.  Gulkote, however, is not as safe as it first appeared.  When Ash thwarts several attempts by the Rani to murder Lalji, the young heir to the throne, he finds his own life is in danger.  With the help of the little neglected princess Anjuli, Ash and Sita escape from the palace.

Before Sita dies, she tells Ash the truth about his birth and gives him his father's papers with directions to the British regiment stationed at Mardan.  Ash is sent to England where he attends public school and then military college at Sandhurst.  Returning to India as an adult to join the Corps of Guides, Ash soon finds himself in trouble with his superiors.  As a punishment, he is chosen to escort the two sisters of the Maharajah of Karidkote to their wedding with the Rana of the faraway state of Bhithor.

Ash has not been with the wedding party for long before he discovers that the state of Karidkote and the Gulkote of his childhood are one and the same – and that the elder of the two princesses in his charge is actually the little girl Anjuli who once helped save his life.  Juli remembers Ash too, and as they get reacquainted with each other, they begin to fall in love.  However, she refuses to abandon her sister Shushila and both princesses go ahead with their marriage.  Ash returns alone to Rawalpindi.

Some time later, a messenger from Bhithor arrives with news of Juli and Shushila.  Their husband, the Rana, is dying and his two wives are expected to burn with him on his funeral pyre.  Hurrying back to Bhithor, Ash is unable to save Shushila but rescues Juli, and the two of them escape together with Juli disguised as a Muslim woman.

Soon after Ash returns to his regiment, the Second Anglo-Afghan War breaks out.  Ash volunteers to work as a British spy in Afghanistan and, refusing to stay behind in India, Anjuli follows him to Kabul.  Realising that his sympathies lie with the Afghan people, Ash decides to resign from the army.  However, he and Juli remain in Kabul, hoping to be of aid to Ash's best friend, Walter Hamilton, who is part of the new British Mission to Kabul.  But following an uprising by mutinous Afghan troops, Wally and the other members of the mission are massacred inside the Bala Hissar fortress.

Having lost everyone else who ever mattered to him, Ash leaves Kabul with Juli to look for the hidden valley Sita had told him about when he was a boy.