Due to the political and social unrest caused by the fall of the Sui dynasty, he went to Chengdu in Sichuan, where he was ordained as a bhikṣu (full monk) at the age of twenty.
His text in turn provided the inspiration for the novel Journey to the West written by Wu Cheng'en during the Ming dynasty, around nine centuries after Xuanzang's death.
"Sanzang" is the Chinese term for the Buddhist canon, or Tripiṭaka ("Three Baskets"), and in some English-language fiction and English translations of Journey to the West, Xuanzang is addressed as "Tripitaka.
In other words, some of the details in the surviving versions of Xuanzang biography were invented or a paleographic confusion introduced an error, or the Persian-Turkish records are unreliable.
[19] In the capital of the country of Bactra, states Xuanzang, is a monastery with a Buddha's idol decorated with jewels and its halls studded with rare precious substances.
[21] There, state his travelogue is a colossal statue of standing Buddha, carved from a rock in the mountains, some one hundred and forty feet tall and decorated with gems.
[25] Xuanzang states that India is a vast country over ninety thousand li in circuit, with seventy kingdoms, sea on three sides and snow mountains to its north.
[26] The residents of India clean their floor and then smear it with a preparation of cow dung, followed by decorating it with flowers, unlike Chinese homes.
After further similar introduction covering the diverse aspects of the Indian culture he observed, including fashion, hair styles, preference for being barefoot, ritual washing their hands after releasing bodily waste, cleaning teeth by chewing special tree twigs, taking baths before going to their temples, worshipping in their temples, their alphabet that contains forty seven letters, the diversity of languages spoken, how harmonious and elegant they sound when they speak their languages, Xuanzang presents the various kingdoms of India.
[26] Xuanzang describes Lampaka (modern Laghman, near the source of Kabul river) as the territory of north India, one whose circuit is more than 1000 li and where all monasteries studied Mahayana Buddhism.
The heretics (Hindus) transmit this text orally from teacher to pupil, and it is this that makes the Brahmanas of this city "great scholars of high talent with knowledge of wide scope".
Xuanzang then describes the surviving monasteries in Sagala with hundreds of Buddhist monks, along with its three colossal stupas, each over 200 feet tall, two built by Ashoka.
[42] Southeast of here, states Xuanzang, is the country of Ahicchattra with ten monasteries and a thousand monks belonging to the Sammitiya sect of Hinayana Buddhism.
Kapitha, states Xuanzang, has a "beautifully constructed monastery with many lofty and spacious buildings adoerned with exquisite carvings" (Li Rongxi translation).
[42][43] The country of Kanyākubja, also called Kusumapura, has the Ganges River to its west, with flowery forests of brilliant colors, transparent waters and prosperous people.
He describes numerous monasteries in the southeast of its capital, along with large Buddhist temple made of stone and brocks, with a thirty feet tall Buddha statue.
It is surrounded by flowery wood, has three monasteries with five hundred monks, and a multi-tiered terraced deva temple that is "exquisitely constructed" (Li Rongxi translation).
[46] At the south of this great city here is a forest full of champaka flowers with a 100 foot ancient stupa with collapsed foundation, originally built by Ashoka.
At the east of this great city two rivers meet forming a dune that is over ten li wide, and it is this place that wealthy people and kings such as Shiladitya come on pilgrimage from ancient times and give alms.
Over sixty li to the northwest of Shravasti capital, he saw a series of stupas built by Ashoka for Kashyapa Buddha, one who lived for "twenty thousand" years, states Xuanzang.
About thirty li to the east of this Narayana temple is an Ashoka built stupa, with a twenty feet high pillar and lion image on its top.
It is painted in gold, silver, pinkish blue, lustrous white and semitransparent pigments, with the Buddha's ornaments in the panel embedded with gems and jewels.
He describes Nalanda as a place with "azure pool winds around the monasteries, adorned with the full-blown cups of the blue lotus; the dazzling red flowers of the lovely kanaka hang here and there, and outside groves of mango trees offer the inhabitants their dense and protective shade" (translation of Rene Grousset).
He arrived in the capital, Chang'an, on the seventh day of the first month of 645, 16 years after he left Chinese territory, and a great procession celebrated his return.
"[74] In celebration of Xuanzang's extraordinary achievement in translating the Buddhist texts, Emperor Gaozong of Tang ordered renowned Tang calligrapher Chu Suiliang (褚遂良) and inscriber Wan Wenshao (萬文韶) to install two stele stones, collectively known as The Emperor's Preface to the Sacred Teachings in Chinese (雁塔聖教序), at the Giant Wild Goose Pagoda.
With the emperor's support, he set up a large translation bureau in Chang'an (present-day Xi'an), drawing students and collaborators from all over East Asia.
His strongest personal interest in Buddhism was in the field of Yogācāra (瑜伽行派), or Consciousness-only (唯識), and he founded a school taking after that tradition in China.
In 646, under the Emperor's request, Xuanzang completed his book, Records of the Western Regions, which has become one of the primary sources for the study of medieval Central Asia and India.
Xuanzang's Records of the Western Regions is the longest and most detailed account of the countries of Central and South Asia that has been bestowed upon posterity by a Chinese Buddhist pilgrim.
His account has also shed welcome light on the history of 7th century Bengal, especially the Gauda kingdom under Shashanka, although at times he can be quite partisan.