In the 23rd year of Jian 'an (2 18), Liu Bei led an army to attack Hanzhong.
In the twenty-fourth year of Jian 'an (2 19), in the first month, Liu Bei led the main force to cross Mianshui, rush along the mountain, and detour to Dingjun Mountain (now south of Mianxian County, Shaanxi Province) after Yangpingguan, waiting for an opportunity to annihilate the enemy according to the dangerous terrain. In order to get rid of passivity, Xia led the troops to compete for Dingjun Mountain. Xia He was defeated by the conquering general Huang Zhong and retreated to Yangping Guandong. When Xia and Liu Bei were fighting, Guo Huai was ill and couldn't play with him. After Xia's death, Wei Jun lost his new coach, fearing that he would be captured by the Shu army, and all the three armed forces were eclipsed. Sima Yi, Guo Huai and Du Fu withdrew their troops and said, "General Zhang, the great name of the country, is feared by Liu Bei; This matter is urgent, and the general can't be safe (the reflection of Shu Wei Zhang Hechuan), so he elected Zhang He as the coach of Wei Jun. When Zhang He took office, all the people were under Zhang He's command, and their morale was firm. The next day, Liu Bei wanted to cross the Han River to attack. People thought they were outnumbered and wanted to repel the Shu army with water as an array. Guo Huai said, "This weakness is not enough to defeat the enemy. It is better for Chen to leave the water, draw on it, and then strike it with a half-aid, then it can be broken "(Biography of the Three Kingdoms, Shu Wei and Guo Huai). So they lined up in the north of Hanshui River, hoping to fight back on the way when the Shu army waded across the river. Liu Bei saw through this plan and refused to cross the river. Guo Huai then persisted, showing that he didn't take it to heart. Soon, Cao Cao let Zhang He have a holiday and took Guo Huai as Zhang He Sima.
In the first year of Huang Chu (220), Cao Cao died, Cao Pi succeeded to the throne as Wei, and Guo Huai was appointed as the marquis of Guannei, which became a long history of Zhenxi. He also enlisted Qiang soldiers to make peace with Zhang He, the left-wing general, and the champion general, in order to win over mountain thieves and Lu Shui against Hu. At this point, Guanzhong was pacified and the people were able to live and work in peace and contentment. In October, xelloss proclaimed himself, known as Wei Wendi in history. Guo Huai went to Beijing to congratulate him, but he was late because of illness on the way. Cao Pi gave a big banquet and scolded Guo Huai, saying, "I used to be a vassal in Tushan, but when I got wind of it, I killed him. Today, I stayed up late in Phoebe, Putian. Why? " Guo Huai replied, "I heard that the Five Emperors first taught the people to be virtuous, and the Xia Dynasty suffered political decline, and then punished them. Today, when I was killed by Tang Yu, I knew that I was not punished by the wind (The Biography of the Three Kingdoms Shu Wei Guo Huai). Cao Pi was very happy after hearing this. Guo Huai was promoted to Yongzhou (Chang 'an, northwest of Jin 'an) and named Sheyang Tinghou. After Guo Huai put down the rebellion of Qiang people, Wei defended the frontier.
In the second year of Taihe (228), Zhuge Liang, the prime minister of Shu, attacked Wei for the first time, and sent Ma Su to guard the street pavilion and station troops in Liucheng. Zhang He led an army to attack the street pavilion, while Guo Huai led an army to feint at Liucheng to contain the Shu army. Later, he broke the Tang Fan of Shu Han Qiang people and added General Jianwei. In the third year of Taihe (229), Zhuge Liang attacked Wei for the third time. They also sent troops to attack Wudu (now Chengxian County, Gansu Province) and Wenxian County, Gansu Province, which had been returned to Shu and Jieting after the war. Guo Huai led the troops to rescue him, but was stopped by Zhuge Liang's main force in Jianwei (now Chengxian West, Gansu Province) and forced to retreat. The Shu army then occupied Wudu and Yin Ping counties. In the fourth year of Taihe (230), it was decided to attack Shu, and the soldiers attacked Hanzhong in three ways. Guo Huai was defeated by the Shu army in Yangxi (now northeast of Weiyuan, Gansu), and several other roads in Wei Jun also retreated due to flash floods and blocked roads. In February of the fifth year of Taihe (23 1), Zhuge Liang attacked Wei for the fourth time and surrounded Qishan. Guo Huai was ordered to guard the Shu army with General Sima Yi and General He. Sima Yi left Feiyao and Dai Ling to lead 4,000 people to guard the pass (now Tianshui, Gansu) and led the main force to the west to save Qishan. Zhuge Liang also divided his troops to attack Qishan and led the main force to meet Sima Yi. Guo Huai and Fei Yao led an army to attack the Shu army, which was broken by Zhuge Liang. The Shu army took advantage of the situation to harvest cooked wheat and take rations. When there is no food in Longyou, it is suggested to transport food from Guanzhong, which is a long journey. At this time, Guo Huai pleaded with the Qiang people, and he turned around and solved the urgent need of stores. Turn to General Wu Yang.
In February of the second year of Qinglong (234), Zhuge Liang led 65,438+10,000 troops to attack Wei for the fifth time. In April, Zhuge Liang arrived in Weinan. Sima Yi led the army across the Wei River and built a water barrier. After analyzing the situation, Sima Yi said to the generals, "If you have the courage, take your military commanders to the east. If you go west to Wuzhangyuan (now southwest of Meixian County, Shaanxi Province), then all the troops will be fine" (The Book of Jin Xuandi Ji). When Zhuge Guo Liang became Wuzhangyuan, the generals of Wei were very happy, only the historian Guo Huai was worried. He said, "If you are smart, go for the North Plain first." ("Zi Jian" Volume 72) Many generals disagree. Guo Huai said: "It is not the benefit of the country to cross the Wei River and climb the plain, and the northern mountain will join forces, isolating the long road and shaking the people outside" (Biography of the Three Kingdoms Shu Wei Guo Huai). Sima Yi realized the importance of Beiyuan and ordered Guo Huai and others to send troops to Beiyuan. Before the wall was built, the Shu army succeeded, but the attack failed, and the two armies were in a state of confrontation. A few days later, Zhuge Liang led the army to the west. People thought Zhuge Liang was going to attack the western front, Guo Huai thought Zhuge Liang's attack on the western front was false and Yang Sui was true. That night, the Shu army really attacked Yang Sui, and Wei Jun repelled the Shu army because of his early preparedness. In August, Zhuge Liang died in the former army, and Yang Yi and Jiang Wei led the Shu army back to Hanzhong. In the first year of Zhengshi (240), Guo Huai was promoted to General Zuo and transferred to General Qian, and he was still the secretariat of Yongzhou.
In the fifth year of Jian 'an (244), Guo Huai led the army to attack Shu. After Wei Jun was the commander of Wang Ping in Shu, Guo Huai was not defeated because he was prepared. Back to the army, Guo Huai has a holiday.
In the eighth year of Zhengshi (247), Qiang Hu people from Yongzhou and Liangzhou (now Wuwei, Gansu) brought Wei into Shu. General Jiang Wei of Shu Wei led his troops out of Longyou (now west of Longshan and Liupanshan in Gansu) to meet them. Guo Huai, Shu soldiers and Jiang Wei fought in Taoxi (west of Taoshui), and Hu Shouling Bai and Zhi Wudai led troops to Shu, while Jiang Wei led troops to Shu. Everything that didn't move was tied up by Guo Huai. In the autumn of the first year of Jiaping (249), Governor Jiang Wei attacked Yongzhou (now Guanzhong, Shaanxi, and eastern Gansu) and built two cities from Qushan (now Dongbaili, Min County, Gansu). Jiang Wei knew the customs and customs of Longxi like the back of his hand, and wanted to introduce Shu and control Longxi. Ju 'an, Li Xin and other goalkeepers were stationed and joined hands with Hu Qiangren to attack nearby counties. Guo Huai and Chen Tai, as officials, led the troops to refuse. Guo Huai adopted the strategy of besieging Chen Taicheng, ordered Chen Tai to beg for the protection of the Shu army, and Nan 'an satrap Deng Ai entered Qucheng (now Dongzhangnan, Min County, Gansu Province) without water and traffic, which made the Shu army in Qucheng very embarrassed. Jiang Wei led the troops to rescue and entered Niutou Mountain (southeast of Min County, Gansu Province, south bank of Taohe River), which was blocked by Chen Taijun. Guo Huai led an army to attack Taoshui in an attempt to cut off Jiang Wei's retreat. Jiang Wei quickly withdrew his eyes. Sentenced to Ann, Li Xin and others isolated, offer the city to surrender. Guo Huai also left the north bank of Dunaitun Baishui (now Bailong River in Gansu) in case the Shu army counterattacked and attacked the Qiang ministries in the west. In the second year of Jiaping (250), Emperor Wei wrote to praise Guo Huai: "The Battle of Hanchuan was almost overthrown. He helped the poor in danger and made great contributions to the palace. After more than 30 years in Guanyou, he recruited foreign troops and conquered the domestic people. From small to large, Liao Hua was destroyed, and the birds were kept safe, with remarkable achievements. I am very grateful to you. Today, I am a general, and I am in the same position as the three divisions, and the section is lifted, and the commander-in-chief remains unchanged "("The Biography of the Reflection of Shu Wei and Guo Huai "). Guo Huai Fengyang Quhou has a food city of 2,780. In the second year of Jacky (255), Guo Huai died of illness, and Wei Emperor posthumously awarded him as a general, the son of Guo.