Driving back Wu invaders After
Cao Rui became Emperor of Wei, he elevated Sima Yi from the status of a district marquis to a county marquis under the title "Marquis of Wuyang". Around that time,
Sun Quan attacked
Jiangxia Commandery and sent his generals
Zhuge Jin and Zhang Ba () to attack
Xiangyang. Sima Yi led Wei forces to resist the Wu invaders, defeated Zhuge Jin, and killed Zhang Ba and more than 1,000 Wu soldiers. In recognition of Sima Yi's efforts, Cao Rui promoted him to General of Agile Cavalry ().
Suppressing Meng Da's rebellion illustration of Meng Da's death at Xincheng. In July 227, Cao Rui ordered Sima Yi to garrison at
Wan, and put him charge of the military affairs of
Jing and
Yu provinces. During Cao Pi's reign, Sima Yi had warned Cao Pi
Meng Da, a
former Shu general who had defected to Wei, was untrustworthy, but Cao Pi had ignored him. Sima Yi was proven right after Cao Pi's death when in late 227, Sima Yi received news Meng Da was planning to rebel against Wei and return to Shu; according to the
Weilüe, he had sent his adviser
Liang Ji () to investigate Meng Da's case while urging Meng Da to visit Luoyang to attend to the Wei court, which alarmed the latter, persuading Meng Da to rebel. According to the
Book of Jin and
Zizhi Tongjian, Sima Yi, upon hearing Meng Da wished to rebel, wrote a flattering letter to Meng Da to distract and confuse him while preparing to suppress the rebellion. While Meng Da was deciding whether to commit to his rebellion, Sima Yi swiftly assembled his troops and secretly led them to attack Meng Da's base in Shangyong Commandery (
上庸郡; around present-day
Zhushan County, Hubei). While heading towards the location, Sima Yi's subordinates suggested they observe Meng Da's actions first before advancing but Sima Yi replied, "[Meng] Da is not a trustworthy person. Now that he is hesitating due to suspicions, we should seize this opportunity to get rid of him." The marching speed was quickened and, covering 2,200
li, Sima Yi arrived within eight days and ordered his subordinates to lead separate detachments to intercept and block Meng Da's reinforcements in the form of Shu and Wu forces that had just arrived at Anqiao () and Mulan Fort () in Xicheng () respectively. Meng Da was taken by surprise, having not expected Sima Yi to appear so quickly at Shangyong Commandery. Meng Da was surrounded on three sides by a river so he set up wooden barriers to defend himself. Sima Yi's forces crossed the rivers, destroyed the barriers, and arrived just outside Shangyong. Sima Yi split up his forces and attacked the city from eight directions for over two weeks. On the sixteenth day, Meng Da's nephew Deng Xian () and subordinate Li Fu () opened the city gates and surrendered to Sima Yi. Meng Da was captured and executed, and his head was sent to the capital
Luoyang; more than 10,000 captives were taken and Sima Yi returned to Wan in triumph.
Governing Jing and Yu provinces While he was in charge of Jing and Yu provinces, Sima Yi encouraged and promoted agriculture, and reduced wastage of public funds. The people of the southern lands were happy and showed their support for him. Shen Yi, a former subordinate of Meng Da, had remained in Weixing Commandery (
魏興郡; around present-day
Ankang, Shaanxi) and had become deeply entrenched there. Shen Yi had been illegally using the Wei emperor's name to carve official stamps and seals, and giving them to others. After hearing of Meng Da's fall, he became worried he would be the next target of Sima Yi's crackdown on traitorous officials. After Sima Yi had suppressed Meng Da's rebellion, many regional officials came to present gifts and congratulate him. Sima Yi sent a messenger to provoke Shen Yi and lure him into a trap. When Shen Yi went to confront Sima Yi, he was captured and sent to the imperial capital. Sima Yi relocated to
You Province with more than 7,000 households from Shangyong Commandery. The Shu military officers Yao Jing (), Zheng Tuo (), and others later brought more than 7,000 men with them to surrender to Sima Yi. Among the thousands of people who migrated to Wei from Shu, many were unregistered residents whom the Wei government wanted to register as citizens of Wei. The Wei emperor Cao Rui summoned Sima Yi back to Luoyang and sought his opinion on this issue. Sima Yi said: "The enemy seized these people through deception and now abandoned them. If we acknowledge their position in our great apparatus of state, they will naturally feel happy and at ease." Cao Rui then asked him which of Wei's two rival states (Wu and Shu) they should attack first. Sima Yi replied: "The people of Wu know that we in the Central States are not adept in naval warfare, hence they dare to live in
Dongguan. When we attack an enemy, we should always block its throat and strike its heart.
Xiakou and Dongguan are the enemy's heart and throat. If we can move our land forces to Wan to lure Sun Quan to advance east, then take advantage of his absence from Xiakou by sending our navy to attack it, it will be like an army from Heaven descending to attack, victory assured." Cao Rui agreed with Sima Yi's view and ordered him to return to his post at Wan. Around August 228, during the time of the
Battle of Shiting, records make brief mention of Sima Yi's involvement in the events by stating he led Wei forces into
Jiangling.
Campaign against Shu edition of the
Romance of the Three Kingdoms In March 230, Sima Yi was promoted to General-in-Chief (), appointed Grand Chief Controller () in charge of multiple commanderies, and – in a continuation of an extremely early tradition – bestowed a ceremonial yellow battle axe. The Wei emperor
Cao Rui put him and Cao Zhen in charge of defending Wei's western borders from attacks by its rival state Shu, which had been
launching invasions since 228. At Cao Zhen's instigation, a campaign against Shu was proposed and eventually implemented after Cao Rui approved his proposal. In August 230, Cao Zhen led an army from
Chang'an to attack Shu via the Ziwu Valley (). At the same time, another Wei army led by Sima Yi, acting on Cao Rui's order, advanced towards Shu from
Jing Province by sailing along the
Han River. The rendezvous point for Cao Zhen and Sima Yi's armies was at
Nanzheng. The army led by Sima Yi passed through Zhuoshan () and Xicheng County (; present-day Ankang, Shaanxi), sailed along the Mian River to Quren County (; west of Yunyang County, Chongqing), and arrived at Xinfeng County (; south of
Weinan, Shaanxi). He made camp at Dankou (). Other Wei armies also prepared to attack Shu from the Xie Valley () or
Wuwei Commandery. The campaign, however, had to be aborted by October 230 because the
gallery roads leading into Shu were too damaged for the troops to pass through, and because of constant heavy rain that had lasted for more than 30 days.
Battle of Mount Qi In 231, Shu forces led by
Zhuge Liang attacked
Tianshui Commandery, and besieged Wei forces led by Jia Si () and Wei Ping () at Mount Qi (; the mountainous regions around present-day
Li County, Gansu). Cao Rui ordered Sima Yi to move to
Chang'an to supervise military operations in
Yong and
Liang provinces. Sima Yi then ordered Fei Yao and Dai Ling to protect Shanggui County (; in present-day Tianshui, Gansu) with 4,000 elite troops and set out with the rest of his men westward to relieve the mountainous battlefield.
Zhang He wanted to take a detachment and station it at
Yong and
Mei counties but Sima Yi reasoned: "If the vanguard is able to face the enemy alone, your words are right; but should they not be able to do so, the dividing of the forces into vanguard and rear would be unwise; in this manner the Three Armies of
Chu were captured by
Qing Bu." After making preparations for battle, Sima Yi, with Zhang He,
Fei Yao, Dai Ling (), and
Guo Huai serving as his subordinates, led the Wei forces to Yumi County (; east of
Qianyang County, Shaanxi) and stationed there. When Zhuge Liang heard of the Wei army's arrival, he led his troops to Shanggui County to collect the harvest. Without good coordination, Sima Yi's subordinates defied his order to defend their positions; a detachment of the Wei army went to attack the Shu forces but were defeated, although accounts from the
Book of Jin make no mention of a detachment being defeated, and records of the campaign tend to vary and prove unreliable. After defeating the enemy, Zhuge Liang foraged for the early spring wheat that was available in the vicinity. Sima Yi's subordinates feared losing the wheat but Sima Yi stated: "Zhuge Liang thinks too much and makes too few decisions. He'll be fortifying his camp and defences first before coming to harvest the wheat. Two days is sufficient for me [to reach Shanggui County]." He arrived within two days after travelling overnight. When Zhuge Liang and his men heard Sima Yi was marching towards their position, they swiftly retreated instead of giving battle. Initially, the Wei emperor
Cao Rui wanted to supply Sima Yi's army with the wheat in Shanggui County and had rejected a proposal to transport grain from
Guanzhong to the front line. Zhuge Liang's movements, however, were quicker than Cao Rui anticipated; only a portion of the wheat produce in Shanggui County was left after the Shu army's harvesting. The Wei general
Guo Huai then asserted his influence over local nomadic tribes and forced them to hand over food supplies for the Wei army. The Wei army was thus able to gain access to food supplies without assistance from the central government in Luoyang. Sima Yi again encountered Zhuge Liang, this time east of Shanggui County at Hanyang () but no direct engagement occurred; Sima Yi drew in his troops and put them into formation while waiting, finding protection in the nearby
defiles; concurrently he sent
Niu Jin to lead a lightly armed cavalry detachment to lure the enemy to Mount Qi, who in the process briefly engaged in battle with Shu vanguard commander
Ma Dai and inflicted some losses on the enemy. Zhuge Liang simultaneously withdrew his forces and Sima Yi thereafter closely followed Zhuge Liang from the rear. Zhang He advised against pursuit on grounds they could effectively station at Mount Qi, combine their forces, and conduct irregular expeditions; Zhuge Liang's provisions were running low and he would soon be forced to retreat, but Sima Yi did not heed this advice and continued his pursuit. Zhuge Liang ordered a retreat towards the eastern side of the Mount Qi ridges, where the Shu army fortified at Lucheng (), seizing control of the hills in the north and south, and using the river as a natural barrier while pitching "covering camps" near the riverbank to take complete control of the water passage. Although his subordinates repeatedly urged Sima Yi to attack the enemy, he was hesitant to do so after seeing the layout of the Shu camps in the hills. He relented when his subordinates criticised and mocked him by saying he would become a laughing stock if he refused to attack. Sima Yi sent
Zhang He to attack the southern Shu camps that were guarded by
Wang Ping while he led a frontal assault on Lucheng from the central avenue. In response, Zhuge Liang ordered
Wei Yan,
Wu Ban, and
Gao Xiang to lead troops to engage and resist the enemy outside Lucheng. The Wei forces suffered an unexpected and large defeat: 3,000 soldiers were killed, and 5,000 suits of armour and 3,100 sets of hornbeam crossbows were seized by the Shu forces but Sima Yi retained a sizable army, which he led back to his camp. Despite his victory, Zhuge Liang could not make use of the momentum to launch a major offensive on the enemy because his army was running low on supplies. The
Book of Jin said Sima Yi launched an attack on the Shu garrisons at this juncture and captured the Shu "covering camps". Zhuge Liang abandoned Lucheng and retreated in the night but Sima Yi pursued him and inflicted roughly 10,000 casualties on the Shu army. This account from the
Book of Jin is disputed by historians and is not included in the
Zizhi Tongjian. According to the
Records of the Three Kingdoms and
Zizhi Tongjian, Zhuge Liang retreated due to a lack of supplies rather than defeat, and the Wei forces pursued him. The pursuit did not go completely smoothly for Wei; Sima Yi had ordered
Zhang He to further pursue the enemy in an attempt to capitalise on their momentum. According to the
Weilüe, Zhang He initially refused to obey Sima Yi's order and argued according to classical military doctrine, one should refrain from pursuing an enemy force retreating to its home territory. Sima Yi refused to listen and forced Zhang He to carry out this order. Zhang He fell into an ambush at Mumen Trail (; in Tianshui, Gansu), where Zhuge Liang had ordered crossbowmen to hide on high ground and fire at approaching enemy forces when they entered a narrow defile. Zhang He died after a stray arrow hit him in the right knee. Regardless of this setback, Cao Rui sent an emissary to congratulate Sima Yi on his victory and rewarded him by adding more taxable households to his marquisate. Sima Yi's advisors
Du Xi and Xue Ti () told Sima Yi the wheat would be ready for harvest the following year and Zhuge Liang would be sure to come seize it. Because Longyou lacked food supplies, they should transport the wheat there that winter. Sima Yi said: "Zhuge Liang advanced towards Mount Qi again and attacked Chencang [; east of
Baoji, Shaanxi] but lost and withdrew. If he advances again, instead of attacking cities, he will call for a battle in the east of Longyou and not the west. Zhuge Liang feels frustrated whenever there is shortage of grain, so he will stockpile supplies when he returns [to Shu]. I predict he won't attack again without at least three harvests' worth of food supplies." Sima Yi then proposed to the Wei imperial court to mobilise farmers from
Ji Province to Shanggui County and put them under the jurisdiction of
Jingzhao,
Tianshui, and Nan'an () commanderies. By 233, Sima Yi's agricultural plan came to fruition and became a source of food supplies for the three commanderies.
Battle of Wuzhang Plains illustration of "a dead Zhuge drives away a living Zhongda". In March or April 234, Zhuge Liang led up to 100,000 Shu troops out of the Xie Valley () and camped at the southern bank of the
Wei River near
Mei County. Sima Yi's subordinates wanted to station their camp north of the Wei River but Sima Yi said: "Many civilians have gathered at the south of the Wei River. That is certain to be a hotly contested location." Sima Yi then led his troops across the river, took up his position with his rear facing the river, and began constructing fortifications. He also said: "If Zhuge Liang is brave enough, he'll move out from
Wugong County and head eastward in the direction of the mountains. If he moves west to the
Wuzhang Plains, we'll have no worries." Around that time, the Wei emperor Cao Rui became worried and decided to send the general
Qin Lang to lead 20,000 infantry and cavalry as reinforcements to join Sima Yi. While Sima Yi and his troops were stationed at the south of the Wei River,
Guo Huai urged him and the officers to move a detachment to the plains on the river's north bank because he foresaw Zhuge Liang would attempt to seize the plains. When the other officers disagreed, Guo Huai stated: "If Zhuge Liang crosses the Wei River and occupies those plains, his troops will have access to the mountains in the north. If they block the road through the mountains, it will cause fear and panic among the people living in the region. This isn't helpful to our state." Sima Yi finally agreed with Guo Huai and sent him to occupy the plains. While Guo Huai and his men were building a camp on the plains, they came under attack by Shu forces but drove them back. Zhuge Liang moved his army west to the
Wuzhang Plains and prepared to cross to the northern bank of the Wei River. Sima Yi sent Zhou Dang () to station at Yangsui (; the area north of the Wei River in present-day
Mei and
Fufeng counties in Shaanxi) and lure Zhuge Liang to attack him. Zhuge Liang, however, did not mobilise his troops for several days. Sima Yi said: "Zhuge Liang wants to take control of the Wuzhang Plains and won't advance towards Yangsui. His intention is obvious." He then sent and Guo Huai to defend Yangsui. Several days later, Guo Huai received news Zhuge Liang was planning to launch an attack in the west and Guo Huai's subordinates wanted to strengthen their defences in the west. Guo Huai was the only one who recognised it was a ruse and that Zhuge Liang was planning to attack Yangsui. He was proven right later as the Shu forces attacked Yangsui at night. Because Guo Huai had earlier set up defences, the Shu forces failed to capture Yangsui. Zhuge Liang could not advance further so he retreated to the Wuzhang Plains. One night, Sima Yi saw a meteor falling towards the Shu camp and predicted Zhuge Liang would be defeated. He ordered a surprise attack on the Shu camp from behind; 500 Shu soldiers were killed, 600 surrendered, and Wei forces captured more than 1,000 livestock of the Shu army. This account, which comes from the
Book of Jin, is not included in the
Zizhi Tongjian. Rather, the accounts from the
Records of the Three Kingdoms were included in the
Zizhi Tongjian. The Wei government observed because the Shu army was far away from its base at
Hanzhong Commandery, it would not be in its interest to fight a prolonged war in enemy territory so it would be better for the Wei army to adopt a defensive posture against the Shu invaders. Cao Rui thus ordered Sima Yi to hold his position and refrain from engaging the Shu forces in battle. Zhuge Liang attempted to lure Sima Yi to attack him; on one occasion, Zhuge Liang sent Sima Yi women's ornaments to taunt him. Sima Yi, apparently feeling enraged, sought permission from Cao Rui to attack the enemy but this was denied. The emperor sent
Xin Pi, bearing the imperial sceptre—a symbol of the emperor's authority—to the battlefield to make sure Sima Yi followed orders and remained in camp. Zhuge Liang knew Sima Yi was pretending to be angry because he wanted to show the Wei soldiers he would not put up with the enemy's taunting and to ensure the Wei soldiers were ready for battle. According to the
Book of Jin, when
Sima Fu wrote to his brother Sima Yi to ask about the situation at Wuzhang Plains, Sima Yi replied: "Zhuge Liang has big ambitions but fails to recognise opportunities. Always scheming but indecisive, he dallies impotently at combat. Though in command of 100,000 troops, he has played right into my plans and faces certain defeat." When Zhuge Liang's envoy visited Sima Yi's camp, the latter inquired about his adversary's sleeping and eating habits, and how busy he was. When told how Zhuge Liang consumed little and did not sleep much, Sima Yi said to his men: "Zhuge Kongming takes little food and does much work; how can he last long?" According to at least one source, Sima Yi continued to provoke Zhuge Liang. Sima Yi reportedly made some 2,000 people cheer by the south-east corner of the military compound. When Zhuge Liang sent a man to inquire on the situation, he stated: "
Eastern Wu's envoy came and said he would surrender." Zhuge Liang responded: "Eastern Wu will not surrender. Sima Yi is an old man who will soon be 60 years old, does he really need to use such a trick?" After a standoff lasting more than 100 days, Sima Yi heard from civilians Zhuge Liang had died from illness and the Shu army had burnt down their camp and retreated. He then led his troops to pursue the enemy and caught up with them but withdrew when the Shu forces got into battle formation. Some days later, Sima Yi surveyed the remains of the Shu camp and said; "He was a genius". He also concluded Zhuge Liang was indeed dead when he saw the Shu army had hastily retreated.
Xin Pi felt they could not yet be certain about Zhuge Liang's death but Sima Yi said: "The most important things in an army are its documents, troops, horses, and supplies. [Zhuge Liang] has abandoned all of them. How can a person lose his five most important organs and still be alive? We should quickly pursue (the enemy)." The ground in the
Guanzhong region was full of
Tribulus terrestris – a ground level plant with spiky burrs – so Sima Yi sent 2,000 men wearing wooden clogs with flat soles to clear the path before his main army advanced and continued pursuing the enemy, although he retreated when he encountered the Shu forces. When Sima Yi reached Chi'an (), he asked the residents there about Zhuge Liang and heard there was a saying: "A dead Zhuge scares away a living Zhongda". When Sima Yi heard that, he laughed and said: "That's because I can predict the living; I can't predict the dead." In 235, Sima Yi was promoted to
Grand Commandant and had the number of taxable households in his marquisate increased. In the same year, when the Shu general
Ma Dai led troops to invade Wei, Sima Yi sent
Niu Jin to lead Wei forces to resist the invaders. Niu Jin defeated Ma Dai and killed more than 1,000 enemy soldiers. However, this account from the
Book of Jin is not referenced in the
Zizhi Tongjian. When a famine broke out in
North China Plain, Sima Yi had more than five million
hu of grain transported from
Chang'an to Luoyang to aid in disaster relief efforts. Around this time, Sima Yi established a military market at Chang'an. When an official named
Yan Fei () reported that the soldiers were insulting the people living there, he summoned the market captain and personally flogged him 100 times in front of Yan Fei, and thereafter strictly supervised the conduct of all the officials and soldiers.
Liaodong campaign In 236, Sima Yi caught a white deer, which was regarded as an auspicious animal, and presented it to the Wei emperor
Cao Rui, who said: "When the
Duke of Zhou assisted
King Cheng in governance, he presented white pheasants to the king. Now you are in charge of Shaanxi and you present a white deer. Isn't this a sign of loyalty, cooperation, long-lasting stability, and peace?" Later, when Cao Rui asked for capable and virtuous men to be recommended to him, Sima Yi recommended
Wang Chang.
Gongsun Yuan, a warlord based in
Liaodong Commandery who previously pledged allegiance to the Wei state, started a rebellion and declared independence, defeating the general
Guanqiu Jian in an engagement. In January 238, Cao Rui summoned Sima Yi to Luoyang to lead a campaign against Liaodong. When asked by the emperor how Gongsun Yuan would respond, Sima Yi stated he may either flee, resist, or defend his capital city; the final option being the worst choice, and the most likely to be used against Sima Yi after some initial resistance. When the emperor asked how long it would take, Sima Yi said he needed one year to lead the troops to Liaodong, to suppress the revolt, and to then return and repose. The Wei government had conscripted many men into military service or recruited them for manual labour to work on Cao Rui's palace construction and renovation projects. Sima Yi felt doing so would increase the burden on the common people and make them resent the Wei government so he advised Cao Rui to halt the projects and focus on dealing with more pressing issues. Thereafter, Sima Yi, with
Niu Jin and
Hu Zun () serving as his subordinates, set out with an army of 40,000 men from Luoyang to attack Liaodong. Cao Rui saw him off at Luoyang's Ximing Gate (), where he ordered Sima Yi's brother
Sima Fu and son
Sima Shi, as well as other officials to attend the ceremony. During the extensive and lively festivities, in which Sima Yi met with elders and old friends, he began sighing and, feeling emotional and dissatisfied, sang a song: Sima Yi advanced with the army, which would later be reinforced by Guanqiu Jian's forces in
You Province, which included the Xianbei auxiliary led by
Mohuba, ancestor of the
Murong clan. The Wei army reached Liaodong in June 238 and as Sima Yi had anticipated, Gongsun Yuan had sent his Grand General Bei Yan () and Yang Zuo () to face him. They built their camps along the Liao River to await Sima Yi's arrival. The Wei generals wanted to attack the enemy on the river's banks but Sima Yi reasoned attacking the encampment would only wear themselves out and deplete their valuable resources; because the bulk of the Liaodong army was at the Liao River, Gongsun Yuan's headquarters at
Xiangping, the capital of the Liaodong Commandery, would be comparatively empty and the Wei army could take it with ease. Sima Yi decided to dispatch Hu Zun with a contingent of his army south with banners and drums to indicate he was going to make a sortie there with a large force. This deceived Bei Yan and his men, who pursued the decoy unit, whereby Hu Zun, having lured the enemy, crossed the river and broke through Bei Yan's line. Sima Yi secretly crossed the river to the north, sank the boats, burnt down the bridges, built a long barricade along the river, and then marched for the capital. Once the opposing generals realised they had fallen for a ruse, they started marching in haste towards the capital. In the night, while heading north to intercept Sima Yi as had been expected of them, they caught up at Mount Shou (; a mountain west of Xiangping), where Bei Yan was ordered to give battle, and was subsequently defeated by Sima Yi and his army. Sima Yi then marched towards Xiangping unopposed, and started besieging it. July brought the summer monsoons, which a year earlier had impeded Guanqiu Jian's campaign. Heavy ran fell for more than a month so even ships could sail the length of the flooded Liao River from its mouth at
Liaodong Bay up to the walls of Xiangping. Despite the water being several feet high on level ground, Sima Yi was determined to maintain the siege regardless of the clamours of his officers, who proposed changing camps. Sima Yi threatened to execute those who advocated for the idea, such as the officer Zhang Jing, who violated the order. The rest of the officers subsequently became silent. Because of the floods, the encirclement of Xiangping was incomplete and the defenders used the flood to their advantage to sail out to forage and pasture their animals. Sima Yi forbade his generals from pursuing the foragers and herders from Xiangping, and upon being questioned by one of his subordinates, stated: "
Meng Da's multitudes were small, but he had food and supplies for a year. My generals and soldiers were four times those of Da, but with provisions not even for a full month. Using one month to plot against one year, how could I not be quick? To use four to strike against one, if it merely makes half be eliminated, I would still do it. In this case, I consider not calculations on death and injuries, I compete against provisions. Now, the rebels are numerous and we are few; the rebels are hungry and we are full. With flood and rain like this, we cannot employ our effort. Even if we take them, what is the use? Since I left the capital, I have not worried about the rebels attacking us, but have been afraid they might flee. Now, the rebels are almost at their extremity as regards supplies, and our encirclement of them is not yet complete. By plundering their cattle and horses or capturing their fuel-gatherers, we will be only compelling them to flee. War is an art of deception; we must be good at adapting ourselves to changing situations. Relying on their numerical superiority and helped by the rain, the rebels, hungry and distressed as they are, are not willing to give up. We must make a show of inability to put them at ease; to alarm them by taking petty advantages is not the plan at all." Officials in the Wei imperial court in Luoyang were also concerned about the floods and proposed recalling Sima Yi. The Wei emperor, Cao Rui, being certain of Sima Yi's abilities, turned down the proposal. Around this time, the
Goguryeo king sent a noble (;
taeka) and the Keeper of Records (
jubu) of the Goguryeo court with several thousand men to aid Sima Yi. On 3 September, a comet was seen in the skies of Xiangping and was interpreted as an omen of destruction by those in the Liaodong camp. A frightened Gongsun Yuan sent his Chancellor of State Wang Jian () and Imperial Counsellor Liu Fu () to negotiate the terms of surrender, where he promised to present himself bound to Sima Yi once the siege was lifted. Sima Yi, wary of Gongsun Yuan's double-crossing past, executed the two, saying in a message to Gongsun Yuan he desired an unconditional surrender: "In ancient times,
Chu and
Zheng were classed as states of equal footing, yet the Earl of Zheng nevertheless met the Prince of Chu with his flesh bare and leading a sheep. I am a superior Ducal Minister of the Son of Heaven, yet Wang Jian and his following wanted me to raise the siege and withdraw my men. Is this proper? These two men were dotards who must have failed to convey your intentions; I have already put them to death (on your behalf). If you still have anything to say, then send a younger man of intelligence and precision." When Gongsun Yuan sent Wei Yan () for another round of talks, this time asking permission to send a hostage to the Wei court, Sima Yi dismissed the final messenger as a waste of time: "In military affairs there are five essential points. If able to fight, you must fight. If not able to fight, you must defend. If not able to defend, you must flee. The remaining two points entail only surrender or death. Now that you are not willing to come bound, you are determined to have death; there is no need of sending any hostage." Sima Yi's previous suggestion of further negotiations was an act of malice that gave false hope to Gongsun Yuan while prolonging the siege and placing further strain on the supplies within the city. When the rain stopped and the floodwater receded, Sima Yi hastened to complete the encirclement of Xiangping. The siege continued day and night using
mining, hooked ladders,
battering rams, and artificial mounds for
siege towers and [ to get higher vantage points. The speed at which the siege was tightened caught the defenders off guard; because they had been obtaining supplies with such ease during the flood, there was apparently no real attempt to stockpile the goods inside Xiangping. As a result, famine and cannibalism broke out in the city. Many Liaodong generals, such as Yang Zuo, surrendered to Sima Yi during the siege. On 29 September, the famished Xiangping fell to the Wei army. Gongsun Yuan and his son Gongsun Xiu (), leading a few hundred horsemen, broke out of the encirclement and fled to the southeast. The main Wei army gave pursuit, and killed both father and son on the Liang River (; now known as
Taizi River). Gongsun Yuan's head was cut off and sent to Luoyang for public display. A separate fleet led by future Grand Administrators Liu Xin () and Xianyu Si () had been sent to attack the Korean commanderies of
Lelang and
Daifang by sea. Eventually, all of Gongsun Yuan's former holdings were subjugated. After Sima Yi's army occupied Xiangping, he erected a pair of guideposts to separate recent and long-serving government officials, and military personnel of Gongsun Yuan's disestablished regime, and ordered a systematic purge of 2,000 officials. He also had some 7,000 men aged 15 and above from within the city executed and raised a
jingguan (, a victory mound) with their corpses while pardoning the remaining survivors. In total, Sima Yi's conquest gained Wei an additional 40,000 households and over 300,000 citizens, although Sima Yi did not encourage these frontier settlers to continue their livelihoods in the Chinese northeast; he ordered those families who wished to return to central China be allowed to do so. Sima Yi also posthumously rehabilitated and erected mounds over the graves of Lun Zhi () and Jia Fan (), two officials who had attempted to stop Gongsun Yuan from rebelling but were executed by him. Sima Yi also freed
Gongsun Gong, the previous Administrator of Liaodong, who had been imprisoned by his nephew Gongsun Yuan. All of this was carried out under an order that stated: "During the ancients' attacks on states, they executed their fiercest enemies, and that was all. Those who were deceived and misled by Wenyi, all are forgiven. People of the Central States who desire to return to their old hometowns are free to do so." Because it was winter, many soldiers were suffering from the cold and wanted extra clothing. When someone said they had a surplus of
ru and suggested giving them to the soldiers, Sima Yi said: "The padded coats are the property of the government. No one is allowed to give them to others without permission." Sima Yi ordered all soldiers aged 60 and above, numbering over 1,000 men, to retire from their service, and for the dead and wounded to be sent home. As Sima Yi led the troops back to Luoyang from Liaodong, Cao Rui sent an emissary to meet them in
Ji and host a victory celebration. He also added Kunyang County (; present-day
Ye County, Henan) to Sima Yi's marquisate so Sima Yi had two counties as his marquisate.
Appointment as regent When Sima Yi arrived at Xiangping, he dreamt Cao Rui asked him to look at his face, which appeared different than usual, and Sima Yi sensed something was wrong. Later, when Sima Yi was in Ji County (; in present-day
Xinxiang, Henan), Cao Rui issued an imperial order instructing him to return to Luoyang via a faster route through the
Guanzhong region. When Sima Yi reached Baiwu (), he received another five orders within three days. Sensing the urgency of the situation, he boarded a
zhuifengche and travelled overnight across the Baiwu region over a distance of more than 400
li, stopping only once for a brief rest, and reached Luoyang the following day. Upon arrival, Sima Yi was led to the bedroom of the Jiafu Hall () in the imperial palace to meet Cao Rui and saw the emperor was critically ill. With tears in his eyes, Sima Yi asked Cao Rui about his condition. Cao Rui held Sima Yi's hand and told him: "I have matters to entrust you. Now that I meet you one last time before I die, I have no more regrets." Cao Rui called into his chambers the Prince of Qin, Cao Xun, and the Prince of Qi, Cao Fang, and while pointing towards Cao Fang stated: "This is he. Look at him carefully and do not make any mistake." Cao Rui had Cao Fang embrace Sima Yi's neck. Sima Yi hit his forehead on the floor and started weeping. Cao Rui thereafter designated Sima Yi as a co-regent for the young Cao Fang alongside the general
Cao Shuang, who had already been designated for the position. Before his death, Cao Rui had planned to exclude Sima Yi from the regency and instead appoint
Cao Yu, Xiahou Xian (), Cao Shuang,
Cao Zhao, and
Qin Lang as the regents. Two of his close aides, Liu Fang () and Sun Zi (), who were not on good terms with Xiahou Xian and Cao Zhao, persuaded Cao Rui to exclude those two, and Qin Lang and Cao Yu, thereby having Cao Shuang and Sima Yi appointed as the regents instead. ==Service under Cao Fang==