This is because Li Yuan, the founding emperor of the Tang Dynasty, regarded himself as a descendant of Laozi, the founder of Taoism, for the sake of pure blood. In order to highlight his position, the emperors of the Tang Dynasty generally took Taoism as the state religion. As the inheritor of Buddhism, Tang Priest wanted to inherit Buddhist teachings, which was in conflict with the rulers of the Tang Dynasty. So when he influenced more and more people to become Buddhists, he was rejected by the rulers.
In fact, before 645 AD, the Tang Priest's fame was not very remarkable. When the Tang priest returned to Chang 'an from the Buddhist holy land and India in 645 AD, he was welcomed by a large number of officials and monks in many monasteries, and this return to China also shocked the then prime minister Fang. In order to show the country's respect for Master Xuanzang, a welcoming ceremony was also held.
Because the scene was too grand, the court also sent guards to maintain order. After that, almost everyone in the Tang Dynasty got to know this master Xuanzang. When the news that millions of believers lined the streets to welcome Xuanzang back to China reached the ears of Tang Xuanzong, Tang Xuanzong immediately thought that Master Xuanzang had extraordinary credibility, and this power was enormous. In order to prevent others from using Xuanzang's power to do things that endanger his rule, Emperor Taizong came up with a way. He wanted Xuanzang to be a secular official to assist him.
Xuanzang devoted his life to the Buddha. He doesn't want to be a high official. In order to be able to translate the scriptures, Xuanzang had to accept the arrangement of the court and live in Chang 'an in exchange for the trust of Emperor Taizong. He thought that in this way, he could study Buddhism with peace of mind, but he didn't expect that this was just the beginning of his tragedy. In 646 AD, Xuanzang wrote his experience in the Western Regions into a book, The Tale of the Western Regions of Datang.
The purpose of writing this book is to introduce the customs of other countries, but the court did not use this book to spread Buddhism, but used it for military expansion. In the 7th century, the relationship between the Tang Dynasty and western countries was rather anxious. In order to prevent western countries from endangering ideological security, the Tang Dynasty needed the geographical reality of western countries to be annexed in one fell swoop.
So Xuanzang wrote a book about his experience in the western regions. According to the actual geographical situation mentioned in the book, Emperor Taizong attacked the western countries in 647 AD and finally recovered the Turks. When Xuanzang learned of this incident, he was somewhat dissatisfied with the court's practice, but he was helpless, so he devoted himself to translating his own Buddhism to seek liberation.
Under his spread, more and more people began to learn Buddhism, and Buddhism had a weak momentum of surpassing Taoism, but it was impossible to exist in Li Tang. The reason why Emperor Taizong valued Xuanzang was to control Buddhism, not to expand it. So when Buddhism rose, the court imprisoned Xuanzang.
From this move, Xuanzang understood the policy of the imperial court and went to Yuhua Temple in northern Shaanxi to translate Buddhism. I hope that I can reassure the rulers through my own actions. Unexpectedly, he died quietly because of an unexpected fall before he could finish translating all the scriptures. A generation of eminent monks disappeared in the long river of history.