장로
In 215, Cao Cao again launched a campaign to conquer Hanzhong Commandery. Initially, Zhang Lu had no hope of standing against Cao Cao's armies, and planned to surrender. His younger brother Zhang Wei (), however, insisted on fighting and lead his army against the invading forces. He was soon killed in battle, and again Zhang Lu considered surrendering. His adviser Yan Pu, told him that surrendering so easily, they would have no position to negotiate from. Instead, Zhang Lu retreated to his fortress at Bazhong (). When leaving his capital, he did not destroy his wealth and treasures, nor attempt to take them with him, instead leaving them behind saying "These things belong to the country, not to me." Cao Cao was greatly impressed by this, and sent a messenger to Zhang Lu asking him to surrender. Yan Pu's plan was successful, as Zhang Lu and his forces were warmly welcomed by Cao Cao. Cao Cao appointed Zhang Lu as General who Guards the South () and enfeoffed his five sons as marquises. Zhang Lu also married his daughter to Cao Yu, one of Cao Cao's sons. When Cao Cao turned Ma Chao's son Ma Qiu () over to Zhang Lu, Zhang Lu personally killed Ma Qiu – most likely as revenge against Ma Chao's desertion.