It was not until the fourth Northern Expedition that Zhuge Liang and Sima Yi really went to war. Zhuge Liang led armies from all walks of life to invade Wei, surrounded Qishan, and then transported food with wooden cows and horses. At this time, General Cao Zhen was seriously ill, and Di Wei sent Sima Yi to Chang 'an, and Zhang He and others attacked Zhuge Liang. Sima Yi sent Fei Yi and Dai Ling to defend Shangguan, and then led the troops to Qishan to help. Zhuge Liang defeated Fei Yao and Dai Ling and immediately robbed their local wheat. Zhuge Liang and Sima Yi met in Shangguandong, Sima Yi held back his troops, but the two sides failed to fight, and Zhuge Liang led the troops back to the defense.
When Sima Yi saw that Zhuge Liang had left, he went out to follow him secretly, observing his every move, fearing that something might go wrong, and followed him until near Qishan. After that, Sima Yi not only followed him up the mountain, but also camped in the camp. At this point, Sima Yi still didn't start work, just followed him. Zhang He and Wei Ping repeatedly asked Sima Yi to take the initiative, even saying that Sima Yi was timid, but Sima Yi just ignored it, and other generals also asked Sima Yi.
After a month of stalemate, Sima Yi thought the time was ripe and sent Zhang He to attack Hanzhong. He led a team to attack Zhuge Liang himself. Zhuge Liang sent Wei Yan out to capture more than three thousand prisoners of war. Sima yi returned to the camp, and soon Zhuge Liang withdrew because of lack of food, and Sima yi sent people to kill him. Zhuge Liang designed an ambush and then shot Zhang He. In this confrontation, Zhuge Liang actually lost nothing, but Sima Yi lost one.