Zhuge Liang's Northern Expeditions were a series of campaigns launched against Wei by Shu's Zhuge Liang. The cautious Wei commander Sima Yi avoided battle and defended fortified positions, and the Shu eventually withdrew from hunger and exhaustion.
Background[]

In 184 AD, three heroes arose in the Later Han Dynasty of China, upon quelling the Yellow Turban Rebellion: Liu Bei, Cao Cao, and Sun Jian. These three men were elected as generals and raised troops to combat the violent Yellow Turbans, who ravaged the land, and they fought again during the campaign to overthrow the traitor Dong Zhuo in 191 AD. Eventually, they went their separate ways as the land devolved into chaos, with the victorious coalition leaders returning home and fighting amongst each other incessantly; Sun Jian was ambushed and killed by Liu Biao a year later. Liu Bei, a humble man, served Gongsun Zan before fleeing to the service of Tao Qian, Cao Cao, and finally, Yuan Shao. By 200 AD, Cao Cao had conquered central China from the other warlords and declared himself Prime Minister. Yuan Shao and Cao Cao fought a battle at Guandu to decide who would rule over China, a battle that Cao Cao won with 20,000 men facing 100,000 of Yuan Shao's men, using strategy to destroy his arrogant foe. Liu Bei fled from the destroyed army and began a period of wandering Jing Province under Liu Biao's service. Meanwhile, Sun Jian's sons Sun Ce and Sun Quan conquered the Wu Territory and eastern Jing Province, and created the kingdom of Wu in their family's name.

By 208 AD, Cao Cao occupied Jing Province and all of Yuan Shao's northern domains. He secured an edict from the Emperor that allowed him to lead 220,000 troops southwards to quell the "rebellion" of Sun Quan and Liu Bei, who gathered only 50,000 troops. The Allied Forces used fire ships to destroy Cao Cao's fleet, immobilized due to the chains that kept them stable, and Cao Cao was forced to content himself with his own territory.
Warfare broke out, and by 214, the land was divided in three; Liu Bei controlled the mountains of western China and eastern Jing Province, Cao Cao controlled all the north and center, and Wu controlled southeastern China. Wei was larger and stronger, but their power was checked by a Wu-Shu alliance (although Wu aided Wei in attacking Shu on more than one occasion). In 220 AD, Cao Cao's son Cao Pi declared Wei independent of the Later Han and overthrew the last emperor, destroying the dynasty as the land fell into anarchy.

The Three Kingdoms in 220 AD.
The man who had devised the "Three Kingdoms Strategy" was none other than Liu Bei's general Zhuge Liang. He had led Liu Bei to victory at Bo Wan Po against a stronger Wei army in 207 AD, and had also masterminded the Chi Bi Offensive. He secretly took over Yi Province from Liu Zhang, an ally of Liu Bei, as the people planned to overthrow their idle master and replace him with the virtuous Liu Bei. When Liu Bei died in 223 AD, Zhuge Liang became regent for his foolish son Liu Chan and mustered troops to conquer Nanzhong, a barbarian region that was provoked into rebelling by an agent of Cao Pi. By 225 AD, Shu's borders were secure, and Zhuge Liang planned to attack Wei in collaboration with Sun Quan.
First Northern Expedition[]

Jiang Wei.
The first campaign started in 227 AD, with Zhuge Liang creating a force of 60,000 troops with Zhao Yun and Deng Zhi as subordinates. His goal was to capture the castles at Tianshui, Nan'an, and Anding in Wei's Hanzhong Commandery, hotly disputed over by Shu and Wei. However, another goal was to capture the Wei strategist Jiang Wei, known for his prodigial talents as a general; he would make a useful asset. The captain of this defense was Ma Zun, who had greater than 50,000 Wei troops.
Zhuge Liang used a ploy, where he captured Nan'an and Anding from their garrisons. He sent Cui Liang back to Ma Zun, telling him that Jiang Wei had defected, and Ma Zun became suspicious of the general. To add to the confusion, Zhuge Liang ordered his troops to isolate Jiang Wei by defeating his sub-officers Sun Li and Zhu Ling.
Once done, Jiang Wei was believed to be a traitor, as he was not targeted. Ma Zun eventually closed the gates of Ji Castle behind Jiang Wei, and he was forced to surrender to Zhuge Liang, who offered him the rank of General and made him his student. Zhuge Liang tested Jiang Wei in this battle, telling him to send an agent into Ji Castle. The agent made it inside and convinced Liang Xu and Yin Shang to surrender, and they opened up the gates. The Shu army rushed into the castle and the Wei casualties were over 55,000. With Tianshui, Nan'an, and Anding captured, the expedition terminated.
Quietus[]

In between the first and second northern expeditions, Wei General Sima Yi devised a plan to recapture Hanzhong. He sent General Zhang He to reconquer the lost territories, and he pacified all of Shu's gains, resulting in stalemate. The Shu thus plotted out a new expedition to regain a foothold in Wei territory. Ma Su was sent to occupy Jieting in anticipation of reinforcements, although Jiang Wei warned him that he could be surrounded. The passages to the mount were sealed off by Zhang He, and Ma Su's army was destroyed. Zhuge Liang fortunately broke through enemy lines and rescued Ma Su, but was forced to execute him for his foolishness.
Second Northern Expedition[]

In 229 AD, Zhuge Liang launched a second northern expedition into Wei. His goal was to secure access to the vital Chen Cang Road by attacking Chen Cang Castle, defended by Hao Zhao. His generals constructed siege works, but Hao Zhao learned to counter them using boulders, deluges of arrows, and fire cannons, and Zhuge Liang took over command of the siege from Jiang Wei, who was instructed to watch and learn. Zhuge Liang sent a force to attack head-on, while another used a mountain pass. In the pass, these troops were ambushed by Liu Ye and Cao Zhen, and the Wei inflicted heavy losses. The frontal force fared no better, as their general Zhang Bao was ambushed and broke his skull falling into a gulley after pursuing Guo Huai, Deng Ai, and Sun Li. Zhuge Liang's condition of health worsened, and even when the Shu broke through the first wall, they faced a secondary wall. The Wei held the Shu off, and Zhuge retreated. Wei general Wang Shuang pursued at Mt. Qin, but was felled by Wei Yan's spear.
Third Northern Expedition[]

In the third expedition of 229-230, nothing much occurred, but a mere standoff. Chen Shi was sent to the Qin Mountains to await the signal to attack Guo Huai, who never attacked, and the Wei withdrew. Wei Yan and 400,000 Shu and Qiang troops advanced northwards, and were met in a skirmish, and Zhuge Liang rescued him, defeating Guo Huai and proudly returning south.
Fourth Northern Expedition[]
The fourth expedition was a horrible blow to Wei morale. The Shu attempted to capture the strategic point of Mt. Qi, which was near the Wei capital of Chang An. Sima Yi and Zhang He fought the Shu forces with Sima Zhao fighting in his first battle, and although a Shu attack was beaten off, Zhang He was hit by an arrow to the right leg while attacking the Shu on the Mu Men Road.
Fifth Northern Expedition[]

Zhuge Liang, terminally ill, refused to die without winning over Sima Yi. With 100,000 troops, he marched north to the Wu Zhang Plains, where he fought a pitched battle with Sima Yi's 200,000 Wei troops. Zhuge Liang's troops launched an offensive and secured their supply lines by occupying some central bases, but Zhong Hui and Deng Ai arrived with a Wei catapult unit that held the Shu attack back. The Shu advanced on the Wei weapons, and defeated Deng Ai, which disabled the use of the catapults. The Wei struck back by cutting off Shu's supplies, destroying their Wooden Ox devices. The battle was getting nowhere by the time that Zhuge Liang died of illness, and Jiang Wei assumed command. Jiang Wei ordered full retreat, and Sima Yi charged. However, a body double of Zhuge Liang appeared and scared the Wei troops off, and the Shu charged and routed the Wei advance units. The battle restarted, and a Shu attack on Wei's main camp routed Sima Yi. Sima Yi was not killed, escaping on his son Sima Shi's horse. Although Wei was defeated, Jiang Wei had to retreat southwards, with Zhuge Liang dead.
Aftermath[]

The death of Zhuge Liang caused Shu to decline, but the victory of Sima Yi also caused Wei to decline; Sima Yi seized power in the Imperial Court, murdering regent Cao Shuang in 249 AD and taking over power. Jiang Wei, now assisted by Xiahou Ba (who fled Wei out of fear for his family), launched a series of northern campaigns, insulted by Fei Yi. Although he had seemingly mastered all of Zhuge Liang's strategies, he was met by an equally-skilled general in Wei's Deng Ai. Although he won as many battles as he lost, he was gradually draining Shu's resources. By 262 AD, both sides had suffered grievous losses, with Xiahou Ba's death at Taoyang that year ending the campaigns. The next year, Sima Yi's son Sima Zhao conquered Shu and founded the Jin Dynasty in place of Wei, which conquered Wu in 280.