The novel Journey to the West was based on historical events. Xuanzang (602 - 664) was a monk at Jingtu Temple in late-Sui Dynasty and early-Tang Dynasty Chang'an. Motivated by the poor quality of Chinese translations of Buddhist scripture at the time, Xuanzang left Chang'an in 629, in defiance of Emperor Taizong of Tang's ban on travel. Helped by sympathetic Buddhists, he traveled via Gansu and Qinghai to Kumul (Hami), thence following the Tian Shan mountains to Turpan. He then crossed what are today Kyrgyzstan, Uzbekistan, and Afghanistan, into Gandhara, reaching India in 630. Xuanzang traveled throughout the Indian subcontinent for the next thirteen years, visiting important Buddhist pilgrimage sites, studying at the ancient university at Nalanda, and debating the rivals of Buddhism.
Xuanzang left India in 643 and arrived back in Chang'an in 646. Although he had defied the imperial travel ban when he left, Xuanzang received a warm welcome from Emperor Taizong upon his return. The emperor provided money and support for Xuanzang's projects. He joined Da Ci'en Monastery (Monastery of Great Maternal Grace), where he led the building of the Big Wild Goose Pagoda to store the scriptures and icons he had brought back from India. He recorded his journey in the book Great Tang Records on the Western Regions. With the support of the emperor, he established an institute at Yuhua Gong (Palace of the Lustre of Jade) monastery dedicated to translating the scriptures he had brought back. His translation and commentary work established him as the founder of the Dharma character school of Buddhism. Xuanzang died on March 7, 664. The Xingjiao Monastery was established in 669 to house his ashes.
Popular and story-teller versions of Xuanzang's journey dating as far back as the Southern Song Dynasty include a monkey character as a protagonist.