a Major () under Xiahou Yuan's command. In 217, Liu Bei launched a campaign to seize control of Hanzhong Commandery from Cao Cao's forces. Guo Huai did not participate in the initial battles as he was ill. After Xiahou Yuan was killed in action at the Battle of Mount Dingjun in 219, there was much panic and fear among Cao Cao's forces in Hanzhong as they had lost their commander. Guo Huai managed to restore order and stability within Cao Cao’s forces in two ways: First, he gathered and regrouped the soldiers who scattered when Xiahou Yuan was killed. Second, he nominated Zhang He to replace Xiahou Yuan as the commander of Cao Cao's forces in Hanzhong. The following day, when Cao Cao's forces received news that Liu Bei's forces were preparing to cross the Han River to attack them, most of Cao Cao's officers suggested that they should make camp on the riverbank and take advantage of the river as a natural barrier to resist the enemy, who had superiority in numbers. Guo Huai disagreed and said: "This isn't the best move because it reveals our weakness to the enemy and can't deter them. Why don't we make camp further away from the river, lure the enemy to attack our camp, and strike back when they are halfway across? We can defeat Liu Bei if we do this." Zhang He and the other officers followed Guo Huai's plan. When Liu Bei saw that the enemy camp was further away from the river, he became suspicious and did not send his troops across the river to attack. Guo Huai also ordered his troops to strengthen their defences and show Liu Bei's forces that they were prepared to hold their ground. Cao Cao was very pleased when he heard about what Guo Huai did. He also approved Zhang He's command and ordered Guo Huai to continue serving as a Major under Zhang He. Service under Cao Pi Following Cao Cao's death in March 220, his son Cao Pi succeeded him as the Imperial Chancellor and vassal King of Wei () under the Eastern Han dynasty. Cao Pi awarded Guo Huai the title of a Secondary Marquis () and reassigned him to be the Chief Clerk () under the General Who Guards the West (). Later that year, Cao Pi appointed Guo Huai as acting Army Protector Who Attacks the Qiang ()