Wu was the second in the imperial examination in Nanming. Later, his paper was read by the emperor of the dynasty, and it was also greatly appreciated. He was famous in the society because of his brilliant talents in the late Ming and early Qing dynasties, and he was the literary leader at that time. Later, he was also an official in the DPRK. Because Chongzhen was very optimistic about Wu, he was also smooth sailing in the officialdom and his status gradually rose.
However, the good times did not last long. In the seventeenth year of Chongzhen, Emperor Chongzhen committed suicide because the capital was breached by Li Zicheng, and the Nanming Dynasty was quickly replaced by the Qing Dynasty. In this case, there must be many ministers of Nanming who chose to surrender, and Wu Sangui, the general of Shanhaiguan, also chose to surrender to the Qing Dynasty. After learning the news of Wu Sangui's surrender, Wu Yewei wrote Yuan Yuanqu to mock Wu Sangui. Later, this poem was also widely circulated. According to records, Wu Sangui once gave Wu gold and asked him to delete or change one of the poems, because it really embarrassed Wu Sangui.
Because at that time, the Qing Dynasty had just been established, and a large number of talents were needed, and Wu at that time was exactly what they needed. So the rulers of the Qing Dynasty invited many people to persuade Wu to surrender, including Wu's in-laws, and later even his mother persuaded him to surrender. Finally, because of too much pressure, he chose to surrender and took the post of imperial academy's wine sacrifice in the imperial court.