Biography.guide
Home › People › Military officer › Wei Yan
Portrait of Wei Yan

Wei Yan

200 – 234

State of Shu Han general (died 234)

Don't just read it — keep itBiographies to ownE-book · Audio · Video From $7 →

About Wei Yan

Lived 200 – 234. Wei Yan was a Chinese military officer and politician.

Wei Yan (died October 234 ), courtesy name Wenchang, was a Chinese military general and politician of the state of Shu Han during the Three Kingdoms period of China. Originally a subordinate of the warlord Liu Bei during the late Eastern Han dynasty, Wei Yan rose through the ranks and became a general after Liu Bei seized control of Yi Province (covering present-day Sichuan and Chongqing) in 214. His performance in battle helped him to become a prominent figure in the Shu military in a short period of time. He was later appointed as the Administrator of Hanzhong Commandery and as an Area Commander in 219. Between 228 and 234, he participated actively in the Northern Expeditions led by the Shu regent Zhuge Liang against Shu's rival state, Cao Wei. After Zhuge Liang's death in September 234, Wei Yan was executed by another Shu general, Ma Dai, for alleged treason.

Early life Wei Yan was from Yiyang Commandery , which covered parts of present-day Nanyang in southern Henan and parts of northern Hubei. He started his career as a foot soldier under the warlord Liu Bei, probably sometime between 209 and 211 when Liu Bei was in southern Jing Province (covering present-day Hubei and Hunan). Around 212, he followed Liu Bei into Yi Province (covering present-day Sichuan and Chongqing) and served Liu Bei as a personal retainer in a war against Liu Zhang, the Governor of Yi Province (益州牧). Huang Zhong and Wei Yan scored many military exploits during the capture of Guanghan County. Thus, Wei Yan promoted to full general.

The campaign met early success with the quick death of Gao Pei and Yang Huai and the later occupation of the passes, followed by the defeat of Liu Zhang's reinforcements at Fu County. Pang Tong was killed during the siege of Luocheng and the siege became a prolonged one. One year later, Wei Yan and Liu Bei finally captured Luocheng, then surrounded and occupied Chengdu together with Zhuge Liang, Zhang Fei along with others. As Wei Yan has made several contributions in the conquest of Yi Province, Liu Bei promoted him to the rank of General of the Ivory Gate .

Administrator of Hanzhong In 217, Liu Bei started the Hanzhong Campaign against his rival Cao Cao.

During his tenure, Wei Yan explained to Liu Bei that he used a strategy called the "double gates" . The ancient text I Ching described this strategy as a particularly designed fortification which laid numerous military garrisons surrounding the outskirt and trail exits linking to Hanzhong.

Northern Expeditions

After Liu Bei died in 223, his son Liu Shan succeeded him as the emperor of Shu. In the same year, Liu Shan enfeoffed Wei Yan as a Marquis of a Chief Village .

In 227, Zhuge Liang, the Imperial Chancellor of Shu, mobilised the Shu military and gathered troops in Hanzhong Commandery in preparation for a large scale invasion of Shu's rival state, Cao Wei (or Wei), where he put Wei Yan in charge of the vanguard division and appointed him as acting Major under the Imperial Chancellor and acting Inspector of Liang Province . During this campaign, Wei Yan always requested to lead a separate detachment of 10,000 troops, take a different route through the Ziwu Valley and rendezvous with the Shu main army at Tong Pass (; in present-day Tongguan County, Shaanxi).

Wei Yan argued that the Ziwu Valley and its resources could support the Shu army's operations at least for a week.

Later in 230, during the Ziwu Campaign, Wei Yan led some troops towards Yangxi (; southwest of present-day Wushan County, Gansu) and engaged the Wei forces led by and Guo Huai and Fei Yao, where Wei Yan managed to inflict a heavy defeat on them. During the same year, he also assisted another Shu general Wu Yi in attacking Nan'an Commandery (; southeast of present-day Longxi County, Gansu) where they scored another victory against a Wei army led by Fei Yao.

During the fourth campaign in 231, Wei Yan was also involved in the Battle of Mount Qi when he, together with the Shu generals Gao Xiang and Wu Ban, scored a major victory against the Wei army led by Sima Yi, during which they killed 3,000 Wei soldiers and seized 5,000 sets of armour and 3,100 crossbows. Sima Yi was forced to retreat back to his camp. Zhang He, a veteran Wei general, was also killed in battle during this conflict.

Wei Yan then asked Fei Yi to assist him in making arrangements for part of the Shu army to remain behind and continue with the campaign, while the rest would retreat back to Shu. He then sent his subordinate to meet Yang Yi and the others, but was shocked to discover that all units were preparing to retreat in accordance with Zhuge Liang's final orders.

Wei Yan was left with only his son(s) and a few followers, and they fled towards Hanzhong Commandery. Yang Yi ordered Ma Dai to give chase. Yang Yi trampled on Wei Yan's head and said:

You inferior slave! Now, can you still commit evil? Sun Quan had also once remarked that once Zhuge Liang died, Wei Yan would prove to be an unreliable person.

Zhang Dan, a contemporary figure of Wei Yan and Eastern Han dynasty military officer who was active around 140 AD on the border of the empire defending against the repeated incursions by the Wuhuan and the southern Xiongnu tribes, had given his own assessment about Wei Yan, as he compared Wei Yan with some famous figures like Han Xin, Sima Rangju, Lü Meng as examples on how talented individual could hail from humble origin, and warned against bureucratic promotion based on established connection.

Chen Shou, who wrote Wei Yan's biography in the Sanguozhi, analysed Wei Yan's death as such: Chen Shou also remarked that Zhuge Liang valued Wei Yan's bravery and was caught in a dilemma when the latter got into conflict with Yang Yi, whose talent Zhuge Liang also appreciated.

A similar, but somewhat different and more detailed, account exists in the historical text Weilüe by Yu Huan. It stated that Zhuge Liang told Wei Yan to set up defences, although he also gave further instruction to "not return here". Pei Songzhi, who added the Weilüe account to Wei Yan's biography and annotated the Sanguozhi, cast doubts on the Weilüe account:

Wei Yan's death was explained in political terms in "Injustice to Wei Yan" , a neoteric article by Zhu Ziyan, a history professor from Shanghai University. Zhu wrote that Zhuge Liang personally appointed Jiang Wan, Fei Yi and Jiang Wei to be his successors, but Wei Yan's appointments and contributions were greater than those of any of them at the time.

Meanwhile, in the Analysis of the Three Kingdoms, Yi Zhongtian commented that Zhuge Liang's last order to forcibly retreat and leave Wei Yan alone was contradicted by what he personally instructed Wei Yan; such contradiction indirectly led to tragedy between Wei Yan and Yang Yi.

Ziwu Valley plan analysis Wei Yan's reasoning for his Ziwu Valley Plan was recorded in the Weilüe, which was then added as an annotation to his biography in the Sanguozhi, where Chen Shou recorded that Wei Yan received intelligence which led him to conclude that the defender of the strategic city of Chang'an, Xiahou Mao, was incompetent. The Weilue argued that the plan might have worked; Sima Yi had acknowledged the possibility that Shu forces would carry out the plan while Xiahou Mao had not realised it.

When the Wei government received intelligence about Wei Yan's Ziwu Valley Plan, the Wei emperor Cao Rui immediately removed Xiahou Mao from his military command in Chang'an and reassigned him to be a Master of Writing in Luoyang.

Meanwhile, Hong Mai (12-13 AD), a Chinese statesman, Confucian scholar and writer during the Southern Song dynasty, has using Wei Yan's "Ziwu Valley" strategy to criticize Zhuge Liang's shortcoming in military strategy, as he repeatedly refused to adopy the former's strategy.

Legacy Military fortification The "Heavy Gate" bulwark designed by Wei Yan during his tenure as Administrator of Hanzhong Commandery particularly turned out useful on two occasions when his successors as Administrator of Hanzhong Commandery used it to repel invaders. It also helped the Shu general Wang Ping defend Hanzhong Commandery from a massive invasion led by the Wei general Cao Shuang. The Shu general Jiang Wei later dismantled the "Heavy Gate" fortification in favour of his own design. However, Jiang Wei's new defence strategy failed to impede Wei invaders led by Zhong Hui, and Jiang Wei himself ultimately lost control of Hanzhong.

Wei Yan Shrines A Wei Yan Shrine is located in Baique Village, Sanquan Township, Zitong County, Sichuan. In front of the shrine flows a Wei Family River . On the plains east of the river, there once stood a Wei Family River Temple , which had three stone tablets in front of it. One of the stone tablets bears the words "Wei Yan once led soldiers and was stationed here."

There is another temple attributed to Wei Yan in Wei Yan's purported hometown in Weijia Village, Gaobao Township, Qingfeng County, Henan. Wei Yan surrendered to Liu Bei after killing his superior, Han Xuan.

During a clash between Liu Bei against Ma Chao forces, Wei Yan defeat Ma Dai after they duelled for several bouts, causing the latter to flee.

During the battle in Hanzhong, Wei Yan and Zhang Fei were unable to overcame Zhang He, causing both to retreat.

According to Zhang Chaoju, Wei Yan was beaten during this campaign by Cao Cao's general, Pang De.

Later, during the battle of Wuzhang plains, Wei Yan lured Sima Yi and his two sons, Sima Shi and Sima Zhao into a fire ambush. However, a sudden, heavy rain caused the fire to extinguish, and the plan failed; prompting the Simas to escape.

Modern era depictions “Sun Qi Mountain” drama which was written by Wei Ming-Lun, that described the relationship between two important historical figures Zhuge Liang and Wei Yan depicted the latter in positive light as it was not Wei Yan intent to betray Shu, which making him as tragic hero figure.

Wei Yan is featured as a playable character in Koei's Dynasty Warriors and Warriors Orochi video game series. He also appears in Koei's Dynasty Tactics 2.

Biography shop

Don’t just read it —
keep it.

Full-length biographies made to live with: read them, listen on the way to work, watch them tonight.

  • E-book
  • Audio
  • Video
Browse the shop — from $7

Instant download · yours to keep · every purchase keeps this site free

Important facts

Born
200, Nanyang
Birth century
Died
234, Shu Han
Nationality
Also known as
Ngai Yin

People in Wei Yan's life

Named in this biography and alive at the same time

Contemporaries

People whose lives overlapped Wei Yan's

Frequently asked questions

Who was Wei Yan?

State of Shu Han general (died 234)

When was Wei Yan born?

Wei Yan was born in 200 in Nanyang.

When did Wei Yan die?

Wei Yan died in 234 in Shu Han.

What was Wei Yan's occupation?

Wei Yan was a military officer and politician.

What nationality was Wei Yan?

Wei Yan was Chinese.

Sources & further reading

· Wikipedia: Wei Yan

· Wikidata: Q378539

· DBpedia: Wei Yan

Cite this page

APA: Biography.guide. (2026). Wei Yan. https://biography.guide/wei-yan/

MLA: "Wei Yan." Biography.guide, https://biography.guide/wei-yan/.

Chicago: "Wei Yan." Biography.guide. https://biography.guide/wei-yan/.

Data last updated: 2026-09-20 · Spot an error? Report a correction.

Page generated 2026-09-27 05:26 UTC