At that time, the eunuch Huang Hao in Shu gradually monopolized power, frequently slandering others and persuading Liu Shan to dismiss Jiang Wei's military command, which repeatedly hindered Jiang Wei's Northern Expeditions and made it difficult to supply troops and provisions. However, Jiang Wei was wholeheartedly dedicated to restoring the Han dynasty and never abandoned his lofty ambitions.
In the second year of the Jingyuan era, the Wei ruler Cao Mao, dissatisfied with Sima Zhao's power, sought to attack him, but the plot was leaked and he was killed. Sima Zhao then installed Cao Huan as emperor, advanced himself to the position of Duke of Jin, and held sway over the entire court. Although Wei had such internal turmoil, it did not reduce its border defenses.
In the third year of the Jingyuan era, Jiang Wei led the fourth Northern Expedition, attacking Nan'an, and engaged in fierce battles with Wei generals such as Deng Ai and Sima Wang. The two armies stalemated at Ta Zhong, with frequent combat and losses on both sides. Seeing that the Wei army was entrenched and concentrated, Jiang Wei feared a quick victory would be difficult, so he withdrew his troops to plan for the future.
Meanwhile, Jiang Wei engaged in military farming at Ta Zhong, training soldiers and storing grain while awaiting an opportunity. The Wei general Deng Ai also built fortifications in the Ta Zhong area, stationing troops to defend and strictly guard against the Shu army. These two famous generals restrained each other here, forming a pincer position.
Although Jiang Wei's repeated Northern Expeditions failed to restore the Central Plains as Zhuge Liang had, his loyalty and courage were commendable, and his strategies were no less than those of the Wei generals. He deeply understood that the strength of Shu Han was declining daily, with internal chaos caused by Huang Hao and no external reinforcements. Therefore, each campaign was a lone deep thrust, essentially a limited force pitted against the might of Wei. At that time, the Han dynasty had long been in decline, heroes were at their wit's end, and there was nothing to be done but sigh.
Deng Ai knew of Jiang Wei's ambitions and deeply admired him, yet each served his own master. The encounter of these two heroes led to continuous warfare, bringing years of unrest to the northwestern border. At that time, Jiang Wei often sighed to himself: the cause of restoration remained incomplete, while the later ruler of Shu, Liu Shan, heeded slanderous talk, showed no ambition, and merely wasted national strength. In the end, a mansion about to collapse cannot be propped up by a single beam.