Xuanzang became a monk young and rose quickly as a scholar, but he was troubled by the contradictions he found in the Chinese translations of Buddhist texts, especially on questions of the mind and consciousness that the Yogacara school addressed, and concluded that he would have to go to India and read the scriptures in their own language. The Tang court refused him a travel permit. Around 629 he left Chang'an anyway, slipping west past the frontier garrisons and across the deserts of the Gobi and the Taklamakan, nearly dying of thirst on the way.
In the oasis kingdom of Turfan he found a devout Buddhist king, Qu Wentai, who tried to keep him and, when Xuanzang held out with a hunger strike, instead furnished him with escorts, letters and gold for the road ahead. He crossed the Tian Shan, skirted the Central Asian khanates, passed through Gandhara and Kashmir, and reached the Buddhist heartland of the Ganges plain. His goal was Nalanda, the greatest monastic university of the age, where he studied for several years under the aged master Silabhadra, learned Sanskrit deeply, and debated the philosophical schools of India. When he turned for home in the 640s he carried, by the traditional count, some 657 texts, along with relics and images: having travelled, over roughly seventeen years, a distance usually reckoned in the thousands of miles.