and ordered him to join Zhang He and Yang Qiu in leading imperial forces to attack Zheng Gan's () bandit forces and the Lushui barbarians () in the Guanzhong region. They succeeded in their mission and restored peace and stability in the Guanzhong region. In late 220, Cao Pi usurped the throne from Emperor Xian, ended the Eastern Han dynasty, and established the Cao Wei (or Wei) state with himself as the new emperor. As Guo Huai fell sick on his journey to the imperial capital Luoyang and had to rest until he was well, he showed up late to congratulate Cao Pi on his coronation. Later, while hosting a banquet to celebrate his coronation, Cao Pi sternly asked Guo Huai in front of all the guests: "In the past, when Yu the Great called the nobles to attend an assembly at Tushan, Fangfeng showed up late and was executed as punishment. Today, you showed up late for the festivities. Why is that so?" Guo Huai replied: "I heard that the Five Emperors taught and ruled their people by virtue. The use of punishments started in the Xia dynasty when its rule began to weaken. Today, as I am living in an age comparable to that of Yao and Shun's time, I know that I won't face the same fate as Fangfeng." Cao Pi was so pleased to hear Guo Huai's response that he appointed him as the acting Inspector () of Yong Province and enfeoffed him as the Marquis of Sheyang Village (). Guo Huai was officially commissioned as the Inspector of Yong Province about five years later. Sometime between 220 and 226, Guo Huai led Wei forces to suppress a rebellion by the Qiang chieftain Biti () in Anding Commandery (安定郡; around present-day Zhenyuan County, Gansu). Whenever the Qiang and other tribal leaders in Yong Province expressed their willingness to submit to Wei rule, Guo Huai always sent his subordinates to gather information about their clans (e.g. demographics) first. When he spoke to the leaders, he surprised and impressed them with his knowledge about their clans. He also paid close attention to, and showed understanding towards the concerns they had. The people in Yong Province praised him as a brilliant and wise governor. Service under Cao Rui In 228, Wei's rival state Shu Han (or Shu) launched the first of a series of invasions on Wei territories in