Language
← Cao Cao's Campaign Against Zhang Lu

Hanzhong Campaign

218 CE (Jian'an 23) · Hanzhong

Between the twenty-second and twenty-fourth years of Jian'an (217–219), Liu Bei adopted Fa Zheng's strategy and personally led his generals north to contest Hanzhong, engaging in two years of grinding attrition against the Wei garrison under Xiahou Yuan and Zhang He. In the first month of the twenty-fourth year of Jian'an, Liu Bei crossed the Mian River south from Yangping and advanced along the mountain terrain, setting up camp at Dingjunshan and Xingshi. When Xiahou Yuan came out to give battle, Huang Zhong charged downhill with battle cries from the high ground, broke through the enemy formation from above, and slew Xiahou Yuan; the Wei defensive line in Hanzhong immediately collapsed. Cao Cao received word and personally led a large army west to Nanzheng, but his supply lines were harassed by Zhao Yun, Huang Zhong, Zhang Fei, and Wei Yan, and he suffered repeated setbacks along the Yangpingguan line. He finally abandoned Hanzhong and withdrew north in the fifth month of the twenty-fourth year of Jian'an. This campaign established the territorial foundation of Liu Bei's control over Yizhou and Hanzhong, and was the direct precondition for his proclamation as King of Hanzhong in the seventh month of the same year.

Outcome

Who won, as each book tells it; commanders as the text names them.

Records

Liu Bei's army won

Commanders
Liu Bei's armyLiu Bei
Cao Cao's armyCao Cao

Vol. 32「夏,曹公果引軍還,先主遂有漢中」

Romance

Liu Bei's army won

Commanders
Liu Bei's armyLiu BeiZhuge Liang
Cao troopsCao Cao

Ch. 73「申耽等聞操已棄漢中而走」

Hanzhong Campaign

Scene

Huang Zhong rides high up the slope, brandishing his blade as he leads his troops down Mount Dingjun. Xiahou Yuan is caught off guard below and his forces are scattered by Huang Zhong’s attack.

Featured people: Huang Zhong、Xiahou Yuan

Imagine this scene →
Map of the Hanzhong Campaign, 218

Swipe to see the whole map

Map of the Hanzhong Campaign, 218See the routes on the live map →

In the Records

  1. 1Liu Bei and Fa Zheng marches on Yangping PassRecords of the Three Kingdoms, juan 32Records of the Three Kingdoms, juan 37
  2. 2Zhang Fei and Ma Chao and Wu Lan and Lei Tong, sent by Liu Bei, marches on XiabianRecords of the Three Kingdoms, juan 1Records of the Three Kingdoms, juan 32
  3. 3Xiahou Yuan and Zhang He holds the Yangping Pass areaRecords of the Three Kingdoms, juan 9Records of the Three Kingdoms, juan 17Records of the Three Kingdoms, juan 32
  4. 4Cao Hong and Cao Xiu meets the enemy at XiabianRecords of the Three Kingdoms, juan 1Records of the Three Kingdoms, juan 9
  5. 5Zhang Fei and Ma Chao falls back to the Yangping Pass areaRecords of the Three Kingdoms, juan 1Records of the Three Kingdoms, juan 9
  6. 6Liu Bei and Fa Zheng and Huang Zhong marches on Mount DingjunRecords of the Three Kingdoms, juan 32Records of the Three Kingdoms, juan 36
  7. 7Xiahou Yuan meets the enemy at Mount DingjunRecords of the Three Kingdoms, juan 32Records of the Three Kingdoms, juan 9
  8. 8Zhang He falls back to Yangping PassRecords of the Three Kingdoms, juan 17
  9. 9Cao Cao marches on Yangping PassRecords of the Three Kingdoms, juan 1Records of the Three Kingdoms, juan 32
  10. 10Cao Cao and Zhang He and Xu Huang falls back to Chang'anRecords of the Three Kingdoms, juan 1Records of the Three Kingdoms, juan 17Records of the Three Kingdoms, juan 32
  11. 11Cao Hong falls back to ChencangRecords of the Three Kingdoms, juan 9

In the Romance

  1. 1Cao Hong marches on XiabianRomance of the Three Kingdoms, ch. 69
  2. 2Cao Hong falls back to NanzhengRomance of the Three Kingdoms, ch. 69
  3. 3Huang Zhong and Yan Yan marches on Mount TiandangRomance of the Three Kingdoms, ch. 70
  4. 4Zhang He and Xiahou Shang falls back to Mount DingjunRomance of the Three Kingdoms, ch. 70
  5. 5Liu Bei and Zhuge Liang marches on Han River100,000NovelRomance of the Three Kingdoms, ch. 70Romance of the Three Kingdoms, ch. 71
  6. 6Huang Zhong and Fa Zheng marches on Mount DingjunRomance of the Three Kingdoms, ch. 71
  7. 7Cao Cao and Xiahou Dun and Cao Xiu marches on Han River400,000NovelRomance of the Three Kingdoms, ch. 71
  8. 8Cao Cao falls back to Yangping PassRomance of the Three Kingdoms, ch. 71Romance of the Three Kingdoms, ch. 72
  9. 9Cao Cao falls back to Chang'anRomance of the Three Kingdoms, ch. 72Romance of the Three Kingdoms, ch. 73

The novel adds Mount Tiandang, Zhao Yun's open camp by the Han and 'chicken ribs'; at Xiabian it has Ma Chao, not Zhang Fei.

The books mostly say only where an army set out and arrived: a Records line is solid between the places they name and dotted where it follows a reconstructed road between them; an open ring marks an end the books don't give.

Why these routes

  • ALiu Bei came up the Jinniu road, which enters the Hanzhong basin at its western gate, Yangping Pass; so the armies first faced each other there.Schol.新华社:金牛道古阳平关(买购百科)Records of the Three Kingdoms, juan 32
  • BThis Yangping Pass stood at today's Wuhou in Mian county, north of the Han; the town of Yangpingguan in Ningqiang is a later pass of the same name, some 70 km away.Schol.古阳平关(买购百科)
  • CLiu Bei crossed the Mian and camped high on Mount Dingjun; Xiahou Yuan had to come out and contest it, and Huang Zhong struck down at him from the heights.Hist.Records of the Three Kingdoms, juan 32
  • DZhang Fei camped at Gushan to cut Cao Hong's line of retreat; Cao Xiu judged it a bluff, struck Wu Lan at Xiabian first, and Zhang Fei duly withdrew.Hist.Records of the Three Kingdoms, juan 9
  • ECao Cao came straight in by the Xie Valley, but Liu Bei held the strongholds and never gave battle; after months stalled, with men deserting daily, Cao withdrew.Hist.Records of the Three Kingdoms, juan 1Records of the Three Kingdoms, juan 32

Base map: Natural Earth; terrain: AWS Terrain Tiles (SRTM and others). Roads and marches reconstructed from the sources listed; positions approximate.

Replay the battles on this map in 3D, phase by phase:▶ Battle of Mount Dingjun


Geography

Hanzhong Campaign
Hanzhong218 CE

History vs. the novel

What happened next

Liu Bei

Continue

Liu Bei

Seven chi five cun tall, with ears hanging to his shoulders and hands reaching past his knees; his eyes could look back upon his own ears, his face like capped jade, his lips as if rouged.

Go to Liu Bei →

Related events

In depth

AI analysis

Strategic Background

The Hanzhong Campaign was not merely a contest for territory; it was the political coming-of-age of Liu Bei's faction, as it moved from dependence to independent rule. In the twentieth year of Jian'an, after Cao Cao subdued Zhang Lu and captured Hanzhong, he did not press south to conquer Shu. Instead, he left Xiahou Yuan and Zhang He to defend the region and returned north himself. Fa Zheng astutely diagnosed this choice as evidence that Cao Cao was “beset by troubles at home,” and concluded that he could not send reinforcements back in the short term. He urged Liu Bei to move north and contest Hanzhong at once. Geographically, Hanzhong was “the throat of Yi Province, a matter of life and death” (in Yang Hong’s words): it connected northward to Guanzhong and Longyou and southward to Bashu. Control of Hanzhong would transform Yi Province from a land enclosed by passes into a strategic platform from which one could advance or retreat. Politically, Liu Bei had been in Shu for only four years and needed a direct victory over Cao Cao to establish his legitimacy. Without Hanzhong, Liu Bei was merely a “provisional Governor of Yi Province,” residing in Chengdu; by taking Hanzhong, he became the legitimate “King of Hanzhong.” From Cao Cao’s perspective, losing Hanzhong would unsettle Guanzhong and weaken Longyou. Yet compared with the repeated rebellions in Huainan, Xiangfan, and Ye during the same period, Hanzhong was not a front on which he could concentrate all his resources. This imbalance in the resources available to each side was the deeper structural factor that determined the campaign’s course.

Forces and Deployment

The campaign unfolded in several stages over two years. On the Shu Han side, Liu Bei was accompanied by Fa Zheng, who served as General of the Army. Early on, Zhang Fei was stationed in Baxi, while Ma Chao attacked Xiabian. In the middle phase, Zhuge Liang coordinated operations from Chengdu, while Li Yan and Yang Hong organized a mass mobilization in the rear, with “men to fight and women to transport supplies”. The commanders at the front were Huang Zhong, Zhao Yun, and Wei Yan, combining veteran and rising generals. Nearly seventy years old, Huang Zhong served as the core of the assault force; Zhao Yun used an “empty-camp stratagem” to repel the enemy at the Han River; and Wei Yan’s achievements in the Hanzhong Campaign brought him promotion to General Who Pacifies the Far Regions and Administrator of Hanzhong. On the Cao Wei side, Xiahou Yuan, as General Who Conquers the West, commanded all the troops in Hanzhong, with Zhang He and Xu Huang as his deputies. Cao Hong reinforced them from Chang'an, while in the autumn of the twenty-third year of Jian'an, Cao Cao himself led an army of 400,000 south through Xiegu. Cao Wei’s deployment appeared formidable in scale, but in reality it lacked a strategist of the caliber needed to counter Fa Zheng. Xiahou Yuan was “too rigid by nature”; after suffering repeated setbacks at Wakou and Dangqu, Zhang He lost the initiative; and by the time Cao Cao personally led the campaign, the armies had already been split across several isolated battlefields.

Key Decision Points

The first key decision was Fa Zheng’s advice to go to war in the twenty-second year of Jian'an. This recommendation recast Liu Bei's faction’s strategic objective from “consolidating its hold on Yi Province” to “contesting Hanzhong in the north,” and served as the spark that ignited the entire campaign. The second was Liu Bei’s crossing of the Mianshui southward in the first month of the twenty-fourth year of Jian'an, and his establishment of a camp on Mount Dingjun. The camp was positioned high on the mountain, forcing Xiahou Yuan to attack uphill. Huang Zhong then “beat drums and shouted from the heights,” killing Xiahou Yuan in the midst of battle. Cao Wei’s defensive line in Hanzhong collapsed in a single day. The third was Cao Cao’s missteps after personally taking command. He failed to concentrate his forces to rescue the remnants at Mount Dingjun, and, “being a suspicious man by nature,” repeatedly changed tactics. Zhuge Liang repeatedly misled him with feints, and in the end Cao Cao retreated step by step along the line from Yangping Pass to Xiegu. The fourth was Liu Bei’s judgment during the Battle of Han River. He heeded Zhao Yun’s unconventional tactic of “driving back the enemy with an empty camp” and did not force a pursuit of Cao Cao’s main army, avoiding the risk of a decisive battle with Cao’s forces at the end of his supply line and preserving the gains made after taking Hanzhong. The fifth, unspoken decision was Cao Cao’s choice to give up. His decision to withdraw after calling the situation “chicken ribs” seemed passive, but was in fact a rational retrenchment in the face of pressure on multiple fronts, including the Yang Xiu case in Xu and the crisis at Xiangfan. Yet this retreat permanently ceded Hanzhong to Liu Bei.

Results and Reverberations

By the end of the campaign, Shu Han had gained all of Hanzhong, and Wei Yan was appointed Administrator of Hanzhong. In the seventh month of the twenty-fourth year of Jian'an, Liu Bei established an altar at Mianyang, where his officials presented a memorial, and he assumed the title of King of Hanzhong. This was a leap in legitimacy from “Governor of Yi Province” to “king,” and marked the point at which the Shu Han regime formally became qualified to “stand against Wei.” In military-geographical terms, Shu Han now possessed strategic depth along the full Chengdu–Hanzhong–Longyou axis; all five of Zhuge Liang’s later northern campaigns would use Hanzhong as their starting base. In terms of the power structure, Fa Zheng rose through this campaign to become Shu Han’s foremost military and political adviser, forming a two-strategist partnership with Zhuge Liang, with one operating internally and the other externally. Sadly, Fa Zheng died of illness the following year, depriving Shu Han of a brilliant strategist capable of matching Cao Wei head-on. For Cao Wei, the loss of Hanzhong did not shake the Central Plains, but Xiahou Yuan’s death symbolized the passing of the first generation of Cao clan generals. The next generation, including Cao Zhen and Cao Xiu, was not yet able to stand on its own. That autumn, Guan Yu’s Flooding of the Seven Armies at Xiangfan created an almost simultaneous public-opinion effect of pressure from north and south alongside the defeat at Hanzhong, forcing Cao Cao to consider moving the capital. The Hanzhong Campaign was therefore not just a battle, but the final piece in the puzzle that gave the Three Kingdoms their basic shape.

Counterfactual Scenarios

The most compelling counterfactual is this: what if Liu Bei had not secured a foothold on Mount Dingjun in the twenty-fourth year of Jian'an, but had continued to confront Xiahou Yuan directly beneath Yangping Pass? Given the advantage of Cao’s cavalry on the plains, Liu Bei might well have been worn down and rendered unable to fight before Cao Cao could arrive in person. The Hanzhong campaign would have ended in a stalemate rather than a swift decision; Huang Zhong would have had no opportunity to “break the enemy’s formation from the heights,” Xiahou Yuan might have survived, and Cao Cao could have consolidated the defenses upon his arrival. Second, if Cao Cao had pressed south to conquer Shu after taking Zhang Lu in the twentieth year of Jian'an—as Fa Zheng initially feared—Liu Bei would have had no time to consolidate his hold on Yi Province. The Three Kingdoms might then have developed into a north-south confrontation between Cao and Sun, with Liu Bei retreating to a corner of Jing Province. A third scenario: if Fa Zheng had not died early the following year, could he have taken on the role of unconventional strategist in Zhuge Liang’s northern campaigns? Judging by his command of the Hanzhong Campaign, Fa Zheng excelled at asymmetric tactics that struck where the enemy was unprepared and disrupted its rear. This complemented Zhuge Liang’s measured, “Eight Formations” style of warfare. Fa Zheng’s early death deprived Shu Han’s northern campaigns of a strategic mind that might have enabled a dual-track approach of offense and defense. To understand the true significance of the Hanzhong Campaign, one must read backward from the dotted line of “what if Fa Zheng had not died.”