In the spring of 234, Zhuge Liang led 300,000 soldiers through Xiagu Pass after three years of preparation since his last northern expedition. At the same time, Zhuge Liang sent an emissary to the allied Eastern Wu, hoping that Wu would attack Wei at the same time. In April, the Shu forces reached the Wuzhang Plains near the Wei River and made camp there. The Wei commander, Sima Yi, well prepared for such a move with a 400,000-strong army, built a fortified position on the southern bank of the Wei River.
Guo Huai suggested that Sima Yi should form a position in the plains' north, since Zhuge Liang would likely strike there. Sima Yi agreed, and sent Guo Huai to set camp there. Shu forces attacked the Wei camp there while it was being built, but Guo Huai was able to repel them.
Sima Yi would not engage the Shu forces, instead trying to make the Shu forces to retreat through . Zhuge Liang understood the problem, and implemented Cao Cao's tuntian system to keep his troops fed.
The Shu army awaited an agreed offensive by Wu for the moment to strike. However, Sun Quan's armies in the were defeated by Cao Rui and succumbed to an endemic disease. Thus the stalemate remained in place and continued for hundreds of days. Shu forces tried to engage the Wei forces several times, but Sima Yi kept his place and would not meet the enemy.
Once Zhuge Liang sent women's clothes to Sima Yi, suggesting that he was a woman for not daring to attack. The Wei officers were enraged by this, but Sima Yi would not be provoked. To appease his officers, Sima Yi asked the Wei Emperor Cao Rui for permission to engage the Shu forces. Cao Rui, understanding the situation, sent his advisor Xin Pi to Sima Yi telling the Wei forces to be patient.
Death of Zhuge Liang
In an attempt to engage the Wei forces, Zhuge Liang sent Sima Yi an emissary urging him to battle. Sima Yi, however, would not discuss military matters with the emissary, instead inquired about Zhuge Liang's tasks. The emissary replied that Zhuge Liang personally manages matters both big and small in the military, from military tactics to meals for the night, but he consumes very little. Sima Yi then told an aide that Zhuge Liang would not last long.
In August, Zhuge Liang fell sick due to exhaustion and his condition became worse everyday. The news reached Shu Emperor Liu Shan, who sent Li Fu to ask Zhuge Liang for Shu's future plans. Zhuge Liang replied that Jiang Wan could take his position after he dies, and should Jiang Wan fall Fei Yi could take over. When asked about Fei Yi's successor, Zhuge Liang fell silent. Li Fu then returned to the capital.
Zhuge Liang also gave instructions on how the Shu forces should withdraw back to Hanzhong: Yang Yi and Fei Yi would lead the forces while Jiang Wei and Wei Yan would guard the rear; if Wei Yan disobeyed, the Shu forces were to leave without him. In the early autumn of 234, Zhuge Liang died at the age of 54.
The Shu retreat
Following Zhuge Liang's death, the Shu forces quietly withdrew from their camps while keeping Zhuge Liang's death a secret. Sima Yi, convinced by the locals that Zhuge Liang had died, gave chase to the retreating Shu forces. Jiang Wei then had Yang Yi turn around and pretend to strike. Seeing this, Sima Yi feared that Zhuge Liang only pretended he was dead to lure him out, and immediately retreated. Common folklore tells of a double, or a wooden statue, that was dressed as Zhuge Liang, driving Sima Yi away in this incident. In any case, word that Sima Yi fled from the already dead Zhuge Liang spread, spawning a popular saying, "A dead Zhuge scares away a living Zhongda" , referring to Sima Yi's courtesy name. When Sima Yi heard of such ridicule, he laughingly responded, "I can predict the living, but not the dead."
News of Zhuge Liang's death was withheld until the Shu army had reached the safety of the Baoye valley to return to Hanzhong. Sima Yi, fearful that the announcement was false and merely another opportunity for Zhuge to demonstrate his talent for ambuscade, hesitated to pursue. Only after his inspection of the empty Shu encampment did he resolve that pursuit was appropriate, but after reaching Baoye and deciding the advance could not be supported with supplies, the Wei army returned to the Wei River.
Conflict between Wei Yan and Yang Yi
Wei Yan, dismayed that the Shu forces are retreating "over the death of one man", collected his men and rode ahead of the main army and razed the gallery road behind them to prevent the main army from returning home. Yang Yi, who held a personal grudge against Wei Yan, sent the emperor a letter accusing Wei Yan of treason; Wei Yan did the same against Yang Yi. Emperor Liu Shan asked Dong Yun and Jiang Wan for their opinions, and both were suspicious of Wei Yan. Liu Shan then sent Jiang Wan to lead a force of imperial bodyguards north to cope with the disorders.
Later, Yang Yi led the main army through the mountains despite the loss of the gallery roads and confronted Wei Yan's detachment at Nangu Pass . There, Wei Yan sent troops to attack Yang Yi while Yang Yi commanded Wang Ping to resist Wei Yan. Upon meeting, Wang Ping scolded Wei Yan, "His Excellency so lately died that his body is not yet cold; how dare you act this way!" Hearing this, Wei Yan's forces scattered, knowing their commander was in the wrong. Wei Yan, along with his sons and a few followers, fled to Hanzhong. Yang Yi sent Ma Dai to give chase, and soon Ma Dai chopped Wei Yan's head off and sent it to Yang Yi. Yang Yi then ordered the execution of Wei Yan's family to the third degree.
Jiang Wan was about ten '''' away from the Shu capital Chengdu when he heard news of Wei Yan's death, so he returned.
After Zhuge Liang's death Jiang Wan took his post, but Jiang Wan was more interested in domestic matters than military expansion. Thus the death of Zhuge Liang ended a huge strategic threat to Wei and the Wei court soon began development of ambitious public works.
Sima Yi's success and subsequent rise in prominence paved the way for his grandson Sima Yan's foundation of the , which would eventually bring an end to the Three Kingdoms period.
In popular culture
Ever since the beginning of the ''Dynasty Warriors'' series on the Playstation 2, the Battle of Wu Zhang Plains has always been one of the final stages of the game.