In the summer of 224, when Zhang Wen was 31, he was appointed as General of the Household Who Upholds Righteousness () and sent on a diplomatic mission to Wu's ally state,
Shu Han. Before he left, Sun Quan told him: "I actually didn't want to send you on this mission. I did so because I was worried that
Zhuge Liang might misinterpret my dealings with the Caos. We should work more closely together with Shu after eliminating the threat of the
Shanyue. As an envoy, you have a mission to complete but you have no restrictions on what you can say." Zhang Wen replied: "I have never held great responsibilities in the imperial court before, nor do I possess the ability to handle diplomatic affairs well. I am afraid I can neither spread Wu's fame as well as Zhang Zhao did, nor make decisions as well as
Zichan. However, Zhuge Liang is wise, discerning and good in long-term planning, so I believe he will definitely understand your intentions and the reasons behind your dealings with
Wei. With the blessing of the imperial court, I believe it won't be difficult to understand what Zhuge Liang is looking out for. There is nothing to worry about." Upon arriving in Shu, Zhang Wen received a warm welcome and was invited to the imperial court to meet the Shu emperor,
Liu Shan. He praised Liu Shan for having many talents in his imperial court, and compared him to the
Shang dynasty ruler
Wu Ding and
King Cheng of the
Zhou dynasty. He then explained that Wu actually wished to maintain friendly ties with Shu, but had to unwillingly submit to Wei because it lacked the military power to resist Wei. He also expressed his gratitude to the people of Shu for their hospitality. The Shu imperial court was very impressed with him and regarded him highly. Shortly after he returned to Wu, Zhang Wen was sent to serve in the military garrison in Yuzhang Commandery () but did not do anything significant there. ==Downfall and death==