Traveling through the early Tang Dynasty, Yun'an became a precarious refugee. In a desperate situation, he killed the county magistrate who was appointed, and took over Puchang, an important Silk Road town, assuming his identity as the Wang family of Taiyuan. This place is characterized by exploitation by aristocratic families, collusion between officials and alien races, and the people's livelihood is in decline. It can be called a dead end. Everyone thought that the new county magistrate would not survive more than three months. Until he defeated Gaochang in the first battle, tens of thousands of Turks were massacred, from the Western Regions to Mobei. Many years later, Li Shimin looked at the figure outside Chang'an who refused to enter the capital, and finally asked those words - "What do you want?" Yun An said: "Your Majesty, I don't want to be the emperor. I just want to see how far the Han people's flag can be planted."