It was led by Zhuge Liang, the Imperial Chancellor of the state of Shu Han, against opposing forces in the Nanzhong region (covering parts of present-day Yunnan, Guizhou and southern Sichuan).
The campaign was a response to rebellions started by local governors in the Nanzhong region and intrusions by the Nanman (literally: "southern barbarians").
In return, Sun Quan appointed him as the Administrator of Yongchang Commandery (永昌郡; covering parts of present-day western Yunnan), which was then guarded by the Shu officials Lü Kai and Wang Kang (王伉).
At the same time, he also sent Deng Zhi and Chen Zhen as diplomats to Wu to meet Sun Quan and convince him to make peace with Shu and rebuild the Shu–Wu alliance against their rival state, Wei.
[2] Around the same time, Zhuge Liang also sent an official, Qi Xing (頎行), to conduct an investigation in Zangke Commandery (牂柯郡; around present-day Guiyang or Fuquan, Guizhou).
Zhu Bao (朱褒), the Shu-appointed Administrator (太守) of Zangke, had heard of the rebellions in the neighbouring Jianning and Yuexi/Yuesui commanderies, so he killed Qi Xing and joined the rebels.
Zhuge Liang then ordered Ma Zhong to lead troops southeast from Bodao County (僰道縣; present-day Yibin, Sichuan) to attack Zangke Commandery, and Li Hui to lead troops southwest from Pingyi County (平夷縣; northeast of present-day Bijie, Guizhou) to attack Jianning Commandery.
Ma Zhong and Li Hui's units rendezvoused with Zhuge Liang's main army[9] and prepared to attack Meng Huo, who incorporated the remnants of the rebel forces into his own.
Jianning 建寧), Yongchang (永昌), Zangke (牂柯) and Yuexi/Yuesui (越巂), Zhuge Liang reformed the administrative divisions to create another two commanderies, Yunnan (雲南) and Xinggu (興古), to improve the quality of the local governments in the Nanzhong region.
[15] More than ten thousand families of the Qiang (羌) tribes along with other strong foreigners from Nanzhong clans were relocated deeper into the Shu region and reorganized into five divisions.
The rest of the foreigners were divided under the great clans of Nanzhong, those were: Jiao (焦), Yong (雍), Lou (婁), Cuan (爨), Meng (孟), Liang (量), Mao (毛) and Li (李).
[18] Many resources were taken from Nanzhong such as gold, silver, cinnabar and lacquer while plow oxen and war horses were used to support the army and the State.
[22] Although historical records mentioned that Zhuge Liang captured and released Meng Huo a total of seven times throughout the campaign, no details were provided.
Apart from this, in the novel, the Shu generals Zhao Yun, Wei Yan and Ma Dai actively participate in the campaign, even though historically there is no mention about their involvement.
The story tells that, on the way back after the campaign, Zhuge Liang and the Shu army came to a swift-flowing river which defied all attempts to cross it.
As Zhuge Liang did not want to cause further bloodshed, he ordered buns shaped roughly like human heads – round with a flat base – to be made and thrown into the river.