In 240, the Shu general
Jiang Wei continued Zhuge Liang's aggressive foreign policy towards Wei and launched the first of
a series of invasions of Wei. Guo Huai led Wei forces to repel the invaders at Longxi Commandery and forced them into the territory of the
Qiang tribes. After Jiang Wei and his troops retreated back to Shu, Guo Huai followed up by attacking the Qiang tribes led by Midang (). He also managed to pacify more than 3,000
Di clans in the region and resettled them in the
Guanzhong region. The Wei government promoted him to General of the Left () in recognition of his achievements.
Resettling Xiuchu clans in Gaoping County Liang Yuanbi (), a
Xiuchu leader in
Liang Province, led more than 2,000 clans to submit to Wei rule. Guo Huai wrote to the Wei government, requesting permission for the Xiuchu clans to be resettled in Gaoping County (高平縣; present-day
Guyuan,
Ningxia), Anding Commandery (). He also established the office of the Commandant of Xichuan () to oversee their safety. For his efforts, Guo Huai was promoted to General of the Vanguard (), in addition to his appointment as the Inspector () of
Yong Province.
Pulling back from a campaign against Shu In 244, Guo Huai served as the vanguard commander when
Xiahou Xuan led Wei forces to attack Shu. During the campaign, Guo Huai sensed that the Wei army was at a disadvantage so he pulled back his troops, and therefore was not greatly defeated. He was conferred imperial authority by the Wei government after returning from the campaign.
Second Shu invasion In 247, the
Qiang tribes, led by Ehe (), Shaoge (), Fatong (), Ezhesai () and others, started a rebellion against Wei in four
commanderies: Longxi, Nan'an (南安; around present-day
Wushan County, Gansu), Jincheng (金城; around present-day
Lanzhou, Gansu) and Xiping (西平; around present-day
Xining,
Qinghai). They attacked several cities and towns in the area, and called for Shu forces to support them. The Wei government ordered
Xiahou Ba to lead troops to garrison at the flank. When Guo Huai and his forces showed up at Didao (狄道; around present-day
Lintao County, Gansu), his advisers suggested that they should attack Fuhan County (枹罕縣; in present-day
Linxia County, Gansu) and pacify the Qiang tribes first before dealing with the Shu invaders. Guo Huai predicted that Jiang Wei would attack Xiahou Ba's position, so he headed south to reinforce Xiahou Ba. As he expected, Jiang Wei did attack Xiahou Ba at the west of the
Tao River, but retreated when Guo Huai and his reinforcements showed up. Guo Huai then moved on to attack the Qiang rebels, killed Ehe and Shaoge, and forced the thousands of Qiang clans to surrender.
Third Shu invasion In 248,
Qiang rebels led by Ezhesai () occupied fortresses in Heguan (河關; in the vicinity of present-day Dingxi, Gansu) and Baitu (白土; in present-day
Minhe County,
Qinghai) counties and used them as defences against Wei forces across the
Tao River. Guo Huai pretended that he was going to attack from upstream, but actually secretly ordered his troops to cross the river downstream to attack Baitu. The assault was successful and the rebels were defeated. Zhiwudai () led his tribal forces to attack
Wuwei Commandery but left his family in Xihai Commandery (西海郡; near the
Juyan Lake Basin,
Inner Mongolia). When Guo Huai learnt about it, he led his troops to attack Xihai Commandery, but encountered Zhiwudai and his forces, who were on their way back from Wuwei Commandery. The two armies clashed at the north of Longyi County (), with the Wei forces emerging victorious and Zhiwudai's forces retreating. Jiang Wei led Shu forces from Shiying (石營; northwest of present-day
Xihe County, Gansu) to Qiangchuan () to rendezvous with Zhiwudai and his retreating forces. He left
Liao Hua behind in Chengzhong Mountain () to build a fortress and gather the remaining Qiang forces and keep them as hostages in the fortress. When Guo Huai heard about Jiang Wei's advances, he wanted to divide his forces into two groups to attack the enemy. His officers, however, had a different opinion. They expected to Jiang Wei to head west to meet Zhiwudai and combine their forces, while Liao Hua would remain behind to defend the Shu position at Chengzhong Mountain. If they split their army into two, their attacking power would be greatly reduced, and they might end up in a situation where they were able to neither resist Jiang Wei nor capture Liao Hua's position. They urged Guo Huai to concentrate on advancing westward to attack Jiang Wei and Zhiwudai separately before they could meet up. Guo Huai stood by his initial plan and said, "If we attack Liao Hua, we can catch the enemy off guard. Jiang Wei will then definitely turn back to save Liao Hua. By the time he returns, we would have already defeated Liao Hua. By doing so, we can make Jiang Wei and his men weary from travelling forth and back. If Jiang Wei does not meet the barbarians, the barbarians will retreat on their own. This is the best approach." He then instructed
Xiahou Ba to lead one detachment to pursue Jiang Wei towards Tazhong (沓中; northwest of present-day
Zhugqu County, Gansu), while he led the other group to attack Liao Hua. As Guo Huai foresaw, Jiang Wei did turn back to save Liao Hua and failed to meet up with Zhiwudai. As a reward for his contributions, the Wei government promoted Guo Huai from a village marquis to a Marquis of a Chief District ().
Fourth Shu invasion In 249, Guo Huai was promoted to General Who Attacks the West () and put in charge of supervising military operations in
Yong and
Liang provinces. In the autumn of 249,
Jiang Wei led Shu forces on a fourth invasion of Wei and built two fortresses at Qushan (麴山; southeast of present-day
Min County, Gansu), which were respectively guarded by the Shu officers Ju An () and Li Xin (). He also contacted the
Qiang tribes and requested assistance from them in harassing the Wei-controlled commanderies in Yong Province. After discussing with
Chen Tai, the Inspector of Yong Province, Guo Huai ordered him,
Xu Zhi and
Deng Ai to lead Wei forces to attack the Shu fortresses at Qushan and cut off their food and water supplies. Ju An and Li Xin led their men to taunt Deng Ai to attack them, but Deng Ai ignored them. As time passed, the two fortresses gradually ran out of supplies. Jiang Wei led his troops from Mount Niutou (牛頭山; west of present-day
Zhaohua District,
Guangyuan,
Sichuan) to reinforce the fortresses. They encountered Chen Tai and his army along the way. Chen Tai ordered his army to build forts to resist Jiang Wei and his troops but refrain from engaging the enemy. At the same time, he also wrote to Guo Huai and requested his help in attacking Mount Niutou. Guo Huai did so and led his forces across the
Tao River in preparation for attacking Mount Niutou. After Jiang Wei retreated, Ju An and Li Xin became isolated at the Shu fortresses at Qushan, so they had no choice but to surrender to the Wei forces. Guo Huai then led his troops further west to attack the restless Qiang tribes and forced them to surrender. == Later life and death ==