Xiahou Xuan was the son of Xiahou Shang. His mother was Princess Deyang, and thus Xiahou Xuan was close to Cao Shuang's faction. Xiahou Xuan had a sister Xiahou Hui, the wife of Sima Shi. One of Xiahou Xuan's daughters became the wife of He Jiao, the grandson of He Qia and the son of He Jiong.
Life
When Xiahou Xuan was 20 years old, he was appointed as a Gentleman of Scattered Cavalry and Gentleman of the Yellow Gate under the Wei government. One day, in the front of the emperor Cao Rui, he expressed his abhor about sitting together with Mao Zeng, the brother of Cao Rui's empress, Empress Mao. This incident aroused the anger of the emperor, who demoted Xiahou Xuan to a supervisor of the Feathered Forest Imperial Guard. Xiahou Xuan, Li Sheng, Deng Yang and Zhuge Dan were notable figures of those days, and were called the "Four Ingenious". Cao Rui hated them as he thought that their behaviour was futile and haughty, so he removed them from office. In 239, after Cao Rui died, his adopted son Cao Fang ascended the throne as the third emperor of Wei. Cao Shuang, who had been appointed as regent by Cao Rui on his deathbed, became the most powerful man in Wei aside from his co-regent Sima Yi. Cao Shuang promoted Xiahou Xuan to a Regular Mounted Attendant and Central Protector of the Army. Xiahou Xuan had a reputation as a scholar and was comparable to He Yan, another member of Cao Shuang's faction. Both Xiahou Xuan and He Yan were friends with Sima Yi's son Sima Shi; Sima Shi and Xiahou Xuan both received high praise from He Yan. After Xiahou Xuan replaced Jiang Ji as the Central Protector of the Army, bribery became a common practice in the Wei government. Though Xiahou Xuan could not stop corruption, he had insights to select competent people and singled out many people of ability. One day, while seeking advice from Sima Yi, he sent a message to the latter: "The nine-rank system is not good. We should restrict the power of the controllers. Therefore, we should fundamentally change the rules and laws of provincial regions". Sima Yi replied that unless someone pushed forward those changes, they would not come into existence and hence the request could not be done. In response, Xiahou Xuan said that Sima Yi's opinion was too passive. Some years later, Xiahou Xuan was promoted to General Who Attacks the West and was tasked with overseeing military affairs in Yong and Liang provinces. He selected his friend Li Sheng to be his Chief Clerk. Following Li Sheng's advice, Xiahou Xuan and Cao Shuang launched a military campaign against Wei's rival state, Shu Han. However, they ended up suffering a crushing defeat at the hands of Shu forces at the Battle of Xingshi when their supply lines became disrupted. Xiahou Xuan and Cao Shuang also suffered great damage to their personal reputations for deciding to launch this disastrous campaign in the first place. In 249, taking advantage of Cao Shuang's absence from the imperial capitalLuoyang, Sima Yi staged a coup d'état against his fellow co-regent and seized power. He later had Cao Shuang arrested and executed along with his family members and supporters. After that, he recalled Xiahou Xuan to Luoyang and appointed him as the Minister Herald. A few years later, Xiahou Xuan was reassigned to be the Minister of Ceremonies. One day, Xiahou Ba, one of his relatives, suggested that he defect to Wei's rival state Shu Han because the Sima family was gradually usurping power from the Wei imperial clan. Xiahou Xuan refused while Xiahou Ba defected to Shu. As Xiahou Xuan was previously one of Cao Shuang's associates, he lived a depressed and deprived life under the Wei government controlled by Sima Yi. He was not allowed to participate in personnel-related matters and only held honorary offices without any real authority. After Sima Yi died in 251, Xiahou Xuan's friend Xu Yun felt happy for him because he thought that Xiahou Xuan no longer needed to live under Sima Yi's control. However, Xiahou Xuan noted that Sima Yi's sons Sima Shi and Sima Zhao would not tolerate his existence for long, and said that Xu Yun's words showed nothing but wishful thinking. Sima Shi succeeded his father as the regent of Wei and continued to monopolise power.
Li Feng's scheme and Xiahou Xuan's death
Around 254, Li Feng, who held the position of Prefect of the Palace Writers in the Wei government, secretly plotted to overthrow and assassinate Sima Shi. He also wanted Xiahou Xuan to replace Sima Shi as General-in-Chief, and restore power into the hands of the Wei emperor Cao Fang, who was merely a puppet ruler under Sima Shi's control. To achieve his purposes, Li Feng secretly contacted Zhang Ji, the emperor's father-in-law, and told him about his plan. However, Sima Shi got wind of the plot so he acted preemptively against Li Feng, Zhang Ji and their fellow conspirators. He also ordered Xiahou Xuan to be arrested and sent to Zhong Yu, the Minister of Justice, for interrogation. Xiahou Xuan acted as if nothing had happened when he was questioned by Zhong Yu. Li Feng, Zhang Ji, Xiahou Xuan and the others were eventually charged with treason and executed.