During Yuwen Hu's regency In 560, Yuwen Hu, apprehensive of Emperor Ming's intelligence, poisoned him to death. Emperor Ming, while on his deathbed, designated Yuwen Yong, then the Duke of Lu, the new emperor, and Yuwen Yong took the throne as Emperor Wu. Yuwen Hu resumed his regency. During Emperor Wu's
Baoding (保定)
era, Yuwen Xian was recalled from his post at Yi Province to be the governor of the capital province of Yong Province (雍州, roughly modern
Xi'an,
Shaanxi). In winter 564, when Yuwen Hu, in alliance with
Tujue, launched a major attack on rival
Northern Qi, Yuwen Xian was sent to command part of the army attacking
Luoyang, along with Yuchi Jiong, Daxi Wu (達奚武), and Wang Xiong (王雄). However, the Northern Zhou army was defeated by the Northern Qi army commanded by
Duan Shao and
Hulü Guang, and Wang was killed, causing the army to panic. Yuwen Xian visited the various army camps and was able to calm the anxious army, and he wanted to resume fighting, but Daxi, as the senior general, judged the situation to be too volatile, and so ordered a withdrawal. From this point on, however, Yuwen Hu entrusted Yuwen Xian with great responsibilities, and he participated in most important decisions. Yuwen Hu often had Yuwen Xian serve as a liaison between himself and Emperor Wu, and Yuwen Xian spent much effort trying to reduce the building tension between the two. By 568, he officially became minister of the army, as well as deputy prime minister (i.e., deputy to Yuwen Hu). Around the new year 570, Yuwen Xian was sent to try to capture the Northern Qi city of Yiyang (宜陽), near Luoyang, and while he was not successful against Hulü, the armies stalemated. In winter 570, Hulü changed tactics and headed north, encroaching onto Northern Zhou territory north of the Fen River (汾水, flowing through modern
Linfen,
Shanxi) and seizing substantial amount of territory. Yuwen Hu requested Yuwen Xian's opinion, and Yuwen Xian opined that Yuwen Hu should personally lead an army but stay some distance away from the front, while Yuwen Xian himself would advance and engage Hulü. Yuwen Hu agreed, and Yuwen Xian subsequently won some minor battles against Hulü, eventually causing the armies to again stalemate, although by that point territory had been lost.
After Yuwen Hu's death In 572, Emperor Wu, apprehensive of Yuwen Hu, conspired with his brother by the same mother, Yuwen Zhi (宇文直) the Duke of Wei, and they ambushed and killed Yuwen Hu. After Yuwen Hu's death was announced, Yuwen Xian personally met Emperor Wu to apologize for having served under Yuwen Hu. Emperor Wu comforted him and had him take over Yuwen Hu's post of
Da Zhongzhai (大冢宰) -- but reduced the power of the post from being prime minister to only being minister of palace affairs, therefore reducing Yuwen Xian's authority while ostensibly promoting him. Yuwen Zhi was still jealous of Yuwen Xian, and several times advised Emperor Wu to execute Yuwen Xian. Emperor Wu refused. In 574, Yuwen Xian's title was changed to Prince of Qi. That year, Yuwen Xian authored a five-volume work on military strategies and offered it to Emperor Wu, and Emperor Wu was pleased with the work. In fall 574, while Emperor Wu and Yuwen Xian were at Yunyang Palace (雲陽, in modern
Xianyang,
Shaanxi), Yuwen Zhi took the opportunity to rebel at the capital
Chang'an. Emperor Wu commissioned Yuwen Xian with an army to suppress Yuwen Zhi's rebellion, although before Yuwen Xian could get back to Chang'an the rebellion was already put down by the official Yuchi Yun (尉遲運). In 575, Emperor Wu, secretly planning a major attack on Northern Qi, only conferred with Wang Yi (王誼) and Yuwen Xian while making his plans, and Yuwen Xian greatly supported the plan. Emperor Wu personally attacked Luoyang, but after sieging it for 20 days without capturing it, he grew ill and was forced to withdraw. While Yuwen Xian made some gains on another front, he abandoned the gains and retreated with Emperor Wu. In winter 576, Emperor Wu again attacked Northern Qi, with Yuwen Xian as one of his major generals. The attack, while initially repelled by Northern Qi, was very successful, and Yuwen Xian greatly contributed to the eventual seizure, around new year 577, of Northern Qi's secondary capital Jinyang (晉陽, in modern
Taiyuan,
Shanxi). Emperor Wu put Yuwen Xian in charge of the operation against Northern Qi's capital Yecheng (鄴城, in modern
Handan,
Hebei), although by the time Yuwen Xian arrived at Yecheng, the Northern Qi emperor
Gao Wei had already abandoned Yecheng and fled. Subsequently, Northern Zhou forces were able to capture Gao Wei. Yuwen Xian's army was said to be so disciplined that the people of Northern Qi were barely disturbed by them. Meanwhile, however, Gao Wei's uncle Gao Jie (高湝) the Prince of Rencheng and cousin Gao Xiaoheng (高孝珩) the Prince of Guangning were still at Xindu (信都, in modern
Hengshui,
Hebei) and resisting Northern Zhou forces. Emperor Wu sent Yuwen Xian to attack Xindu. Yuwen Xian sent a letter from Gao Wei and wrote a letter himself, both trying to persuade Gao Jie to surrender, but Gao Jie refused. Yuwen Xian, however, was able to defeat Gao Jie and Gao Xiaoheng, capturing them. Impressed with their bravery, he personally treated them with respect, even personally attending to Gao Xiaoheng's wounds. Subsequently, Yuwen Xian also defeated the
Xiongnu tribal chief Liu Moduo (劉沒鐸), who had claimed imperial title, and captured Liu. In 578, Emperor Wu was launching a campaign against Tujue, but Yuwen Xian, apprehensive of his own successes on the battlefield, declined a commission from Emperor Wu to lead the army, making an excuse that he had a skin disorder that made it difficult for him to attend to the army. Before Emperor Wu actually launched the campaign, however, he fell ill and died, and was succeeded by his son and
crown prince Yuwen Yun (as Emperor Xuan). ==Death==