In the spring of 234, Zhuge Liang led 100,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 near the Wei River and made camp there. The Wei commander, Sima Yi, well prepared for such a move with a 200,000-strong army, built a fortified position on the southern bank of the Wei River.
Meanwhile, Cao We forces launched an attack against Sun Quan led by the emperor Cao Wei from the border city of Hefei in an attempt to thwart an invasion from Wu. The timely response of Wu commanders Lu Xun and Zhuge Jin (brother of Zhuge Liang) averted the advances of Wei forces while inflicting catastrophic defeat against the army of Cao Rui and the occupation of Hefei by Eastern Wu.
The Battle of Wuzhang Plains
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 attrition. Zhuge Liang understood the problem, and ordered some soldiers to do agriculture and convert vast regions of occupied territories into farmlands to allowing the Shu army to be fed within enemy territory (Tuntian agriculture). Zhuge Liang tries to engage the Wei forces but Sima Yi kept his place. Thus, a stalemate ensued for several months with neither sides gaining advantage.
The Death of Sima Yi and the Fall of Chang'an
Zhuge Liang and Jiang Wei thought of a plan to lure Sima Yi into launching an attack. According to this plan, Zhuge Liang would feign illness and will not appear with the army for several days. The Shu army will also be "starved" so to create an impression to spies that Zhuge Liang's forces are depleted of supplies. They will send an emissary to convince Sima Yi of the Zhuge Liang's illness and the Shu army's predicament of hungry soldiers. Shu forces will also "retreat" from Wuzhang Plains to lure Sima Yi into attacking while Jiang Wei and Ma Dai sets up an ambush near Baoye Valley.
Several days after, Zhuge Liang called the top Shu generals into his tent to organize a "retreat". Later, Shu forces withdrew from Wuzhang plain. Sima Yi, first hesitated to attack but the locals he asked were convinced that Zhuge Liang was already dead and so he gave a chase to the retreating Shu forces. Upon reaching Baoye, troops lead by Ma Dai blocked Sima Yi's escape route and Jiang Wei signals the ambush regiments to attack. Sima Yi tried to break free of the encirclement but was killed with an arrow shot, along with his son Sima Zhao and Guo Huai, his advisor.
Upon confirming Sima Yi's demise, Shu forces resumed the offensive. With no army standing between Zhuge Liang and Chang'an, Shu forces marched and occupied the city. Cao Rui fled east to Luoyang and made preparations to defend the city.
Fall of Luoyang
The Strategy of the Wooden Tiger
At Luoyang, Cao Rui ordered the preparation of the city's defenses. Already suffered a devastating defeat at the hands of Wu, thoughts of the loss of the mandate of heaven were already sinking into the minds of the Wei citizens. In order to curb this thought, a lavish banquet was set up at the capital to show to the people that Cao Wei is prosperous enough to win the battle. Noblemen and peasants alike were invited in the feast. However, thoughts of war still linger among the citizens as the Shu army approaches the outskirts of Luoyang.
Zhuge Liang called a council of top Shu generals saying "that Luoyang is well fortified and the people are feasting in the middle of a war. This means their supplies could last longer than ours. If someone could get in and open the city gates, our armies can march straight into victory. Therefore, I propose this plan. Let there be another standoff between Wei an Shu forces. Then we will make them believe that our supplies will not last long enough and we will feign retreat and hide our armies at the mountains. While we "withdraw", we will leave a giant wooden tiger as a "gift" to Cao Rui. Inside this gigantic statue we will twenty of our men. The people of Luoyang will feast all night long and after they drown themselves in wine, the men inside the statue will silently kill all those guarding the gates and our armies will slay all armed men and Cao Wei will fall to us."
"Master" said Jiang Wei "your plan is perfect. Cao Rui is not acting in sound mind. How could a city throw a lavish feast in the midst of a war. The people of Luoyang are drinking every night. From the emperor himself to his generals to nobles and peasant they are all red with wine. They seem to have a supplies that will last for eternity."
"Your foreknowledge in the situation is good, Jiang Wei" replied Zhuge Liang. "But we must take extra precaution. If in case we fail in this plan in taking Luo Yang, we will turn the vast empty lands of the occupied territory. If we could do this, we could feed the army longer and we can prolong the siege for years until Luoyang's eternal suppliesm are depleted then we could make a move."
While the Shu army made a standoff at Luoyang, Zhuge Liang and a group of Shu craftsmen secretly carved a giant wooden tiger as a gift to Cao Rui. Then the Shu army secretly withdrew to nearby mountains, leaving behind the giant wooden tiger. Hidden inside were twenty men led by Ma Dai and Wei Yan. After midnight when the people are drowned in wine, they open the city gates for the Shu army to enter.
Cao Rui Accepted the Wooden Tiger and Celebrated "Victory"
After the Shu army withdrew from their encampment, Cao Rui left the city to personally see the empty camps of Shu and declared a victory. His men led him to the gigantic wooden tiger. The emperor was seized with awe as he saw the colossal statue and he declared it to be a gift from the heavens. Xin Pi, his advisor, however cautioned him. "Zhuge Liang is an expert craftsman ambush and surprise attacks. Are you willing to take a trophy from an enemy who has not yet surrendered?" he said. Cao Rui replied "What do you want me to do?" "Burn it to ashes!" suggests Xin Pi.
"Don't you have any piety to the heavens?" Cao Rui replied "Your advice will drew the ire of the gods upon us. This tiger is no doubt made and given by the heavens. No mortal soul carve a giant statue overnight. If the Shu army made it, we will surely see it being erected." Xin Pi no longer made any word against Cao Rui's decision who had ordered the statue be moved into the city.
The people of Luoyang feasted extravagantly that day that the water cisterns are "being filled with expensive wine." Except for Xin Pi, who is very suspicious of the wooden tiger, all men, beginning from the emperor Cao Rui to nobles, soldiers and peasants alike immersed themselves with wine. It is said that Cao Rui swam in a pool of wine along with his women. The feasting goes on until midnight when the people are heavy with alcohol. Then the twenty men led by Ma Dai and Wei Yan inside the giant wooden tigerwent out to carry out the plan.
Ma Dai Kills Xin Pi and Open the City Gates
Past midnight, the people of Luoyang were exhausted and took a rest. Xin Pi had taken a precautionary measure to guard the statue by himself, as his men were already drunk. Ma dai and Wei Yan, hearing no more sounds of feasting, gave signals for the rest of the men to leave the wooden prison. Xin Pi is near the statue and when he saw men going down from the statue, he attempted to in vain alert the drunken soldiers but Ma Dai quickly chopped his head off and hid his body. The men took to the city gates, killed their guards without making any sound and open them. Wei Yan gave signals for the Shu armies to enter. Jiang Wei, Yan Yi, Ma Cheng and Guan Xing led their troops inside Luoyang, killing every soldier who tried to resist them. Jiang Wei went straight into the palace and captured the drunken Cao Rui.
Cao Rui is Presented to Zhuge Liang and Orders the Surrender of Cao Wei to Shu Han
Within hours the city was breached, the struggling Luoyang troops could hardly organize. Resistance that was offered to Shu were made by drunken soldiers who fought in their own. One by one Shu generals captured Cao Wei commanders in the city and seize control of the fortresses. Cao Rui realized his folly but he was too late. Believing that a could emperor will not let his people suffer purposelessly, he issued an order for all troops in Luoyang to lay down their arms.
The following morning Zhuge Liang went into the newly capitulated city and made negotiations with the Cao Rui. He wrote a recommendation to Liu Shan, emperor of Shu Han, to make Cao Rui into the titulary Marquis of Nanzhong on the condition that he move to Chengdu along with his family. Cao Rui then issued his last edict ordering the surrender of all Cao Wei forces to Shu Han, believing that the empire will only prosper in peace.
Zhuge Liang's last northern campaign enabled Shu Han to conquer Northern China. It inherited the wealth of Cao Wei, enabling the empire to prosper and Liu Shan implement various reforms.
Following his surrender, Cao Rui relocated to Chengdu along with his family and they live peacefully until the year 266 when he died of natural cause. He was 64 years old.
Zhuge Liang returned to Chengdu after the campaign. For the rest of his life, he will manage state affairs and assist Liu Shan in governing the empire, turning Liu Shan from an incompetent ruler to a great emperor. When Zhuge Liang died in 255, he was succeded by Jiang Wei as chancellor of the state.
After completely dominating Northern China, Shu remained an ally of Wu until the year 280 after Zhang Ti deposed the tyrannical Sun Hao and hand over Wu to Shu, believing that Shu Han is the worthy successor of the fallen Han dynasty. Shu Han itself lasted until the year 581, when the Sui dynasty took power over China. However, the remnants of Shu Han would flee west and establish a kingdom along the silk road and eventually invade and conquer Sassanian Persia and the much of the Byzantine Empire.