information:filtering, linguistic:translation, structural:reformatting
Appointment as regent (223)

Following his defeat at the Battle of Xiaoting in 222, Liu Bei retreated to Yong'an County (永安縣; present-day Fengjie County, Chongqing) and became critically ill in early 223. He summoned Zhuge from Chengdu, and told him: "Sir, you're ten times more talented than Cao Pi. You'll definitely bring peace to the Empire and accomplish our great mission. If my heir can be assisted, then assist him; if he turns out to be incompetent, then you may make your own decision."

With tears in his eyes, Zhuge replied: "I'll do my utmost and serve with unwavering loyalty until death!" Liu Bei then instructed Liu Shan, his son and heir apparent, as follows: "When you work together with the Imperial Chancellor, you must treat him like your father." Liu Bei then named Zhuge Liang as regent for Liu Shan, and Li Yan as deputy regent. He died on 10 June 223 in Yong'an County.

The last command of Liu Bei to Zhuge Liang, translated literally above as "you may make your own decision" (君可自取) is ambiguous. Chen Shou commented that Liu Bei wholeheartly trusted Zhuge Liang and was permitting him to assume leadership. Yi Zhongtian in his "Analysis of the Three Kingdoms" presented several interpretations of Liu Bei's message. Some argued that Liu Bei said that only to test Zhuge Liang's loyalty as his brother, Zhuge Jin, was working for Eastern Wu. Others commented that the ambiguous phrase did not mean Zhuge Liang was allowed take the throne for himself, but he was permitted to, when the situation demanded, replace Liu Shan with other of Liu Bei's living sons such as Liu Yong and Liu Li.

Following Liu Bei's death, Liu Shan ascended the throne and succeeded his father as the emperor of Shu. After his coronation, Liu Shan enfeoffed Zhuge Liang as the Marquis of Wu District (武鄉侯) and created a personal staff to assist him. Later, Zhuge Liang assumed an additional appointment as Governor of Yi Province (益州牧). He personally oversaw all state affairs and made the final call on all policy decisions.

When rebellions broke out in the Nanzhong region of southern Shu, Zhuge Liang did not immediately take military action to suppress the rebellions because he thought it was not appropriate to do so in light of the recent death of Liu Bei. In late 223, he sent Deng Zhi as Shu's ambassador to Eastern Wu to make peace and rebuild the Wu–Shu alliance against Cao Wei.

During his regency, Zhuge Liang set Shu's objective as the restoration of the Han dynasty, continuing Liu Bei's objective. He appointed large numbers of local elites as low level officials, improving relations between Liu Bei's conquest bureaucracy, local elites, and the people of Shu.