Deng Ai then led over 20,000 elite troops, advancing from the Yinping path. This path was rugged and perilous, with steep cliffs that even monkeys found hard to climb and birds difficult to fly over. Ai led by example, wrapping himself in felt, lowering himself down with ropes, and the soldiers followed suit, chiseling mountains to open roads and building bridges with wood, enduring great hardships before they could pass. Their grain and supplies were all carried on men's backs; the Shu roads were difficult to traverse, and their suffering was even greater. Traveling over a hundred li in a day and night, covering more than seven hundred li, the mountain paths were treacherous, and many fell to their deaths from the cliffs, their misery beyond words. The officers and soldiers were utterly exhausted, but Ai did not complain of hardship. After nearly seven days, they finally arrived at the city of Jiangyou. The defending general, Ma Miao, seeing the Wei troops descending as if from heaven, was stunned and at a loss, so he opened the city gates and surrendered. Deng Ai captured Jiangyou with no effort at all, and advanced to threaten Mianzhu.
Deng Ai captured Jiangyou, his spearhead directly pointing at Mianzhu. Shu's ruler, Liu Shan, upon hearing that Deng Ai had already taken Jiangyou, was greatly alarmed. Zhuge Zhan, the son of Zhuge Liang and then General of the Guards, volunteered to lead the fight. Liu Shan agreed, dispatching 50,000 elite troops, ordering Zhan and his son Zhuge Shang to go out together to defend Mianzhu. Deng Ai sent a letter to summon their surrender. When the two armies faced off, Ai ordered his son Deng Zhong and Shi Zuan to fight; the three of them displayed great valor, fighting several rounds, but no one was killed. Father and son Zhuge Zhan fought but could not prevail and retreated into Mianzhu Pass. Zhan said angrily: " My father, the Chancellor, served the state with utmost loyalty. My father and I have received the state's favor for generations, and I swear I will not live together with you!" So he beheaded the envoy and led his troops to give battle.
Deng Ai led his troops to besiege them from all sides; Zhuge Zhan, his son Zhuge Shang, Minister Zhang Zun, Huang Chong, and others all died in battle. Once Mianzhu was lost, the gateway to Chengdu was wide open. Liu Shan, hearing that both Zhuge Zhan and his son had died in battle, wept mournfully in the court. At the time, the eunuch Huang Hao and others either advised Liu Shan to surrender to Wei or to flee to Nanzhong. The Later Lord followed Qiao Zhou's advice, and thus sent an envoy bearing a memorial, riding in a plain carriage drawn by white horses, and went out of the city to surrender. Jiang Wei, hearing that Deng Ai had already captured Mianzhu and Liu Shan had surrendered, looked up to heaven and sighed, saying: "My plan has failed; this is the will of Heaven!" So he led his troops to feign surrender to Zhong Hui, hoping to restore the state, but it was already beyond redemption. Thus Shu Han came to its end.