Zhang Wenxu hails from Hedong. His father, Zhang Ju, served as the magistrate of Huanshui County during the Kaihuang era and was renowned for his integrity and uprightness. His family possessed thousands of books, which he used to educate his children and nephews, all of whom passed the imperial examinations and became officials. Zhang Wenxu was well-versed in a wide range of texts, especially in the "Three Rites," "Book of Changes," "Book of Songs," "Book of Documents," and "Spring and Autumn Annals." He particularly enjoyed Zheng Xuan's annotations, viewing them as a testament to profound knowledge. He also carefully studied the various interpretations by other Confucian scholars.

The Emperor summoned renowned Confucian scholars to the court, such as Fang Huiyuan, Zhang Zhongrang, and Kong Long, all of whom were appointed as scholars. Zhang Wenxu was studying at the Imperial Academy at the time, and Fang Huiyuan and others greatly admired him, with the entire academy holding him in high regard. Many students sought his counsel on challenging questions, and Zhang Wenxu was always able to offer comprehensive insights, drawing on a wide range of sources. The Grand Secretary Huangfu Dan, a prominent figure at court, revered Zhang Wenxu as his teacher. On each occasion, when Huangfu Dan went to the South Platform for official business, he deliberately dressed up his horse and visited Zhang Wenxu. Zhang Wenxu would lead the horse each time as a way to demonstrate that he was not seeking to curry favor with the powerful by receiving such visits.

After the Right Minister Su Wei heard about Zhang Wenxu's reputation, he summoned him for a conversation and was very happy, urging him to take an official position. Zhang Wenxu did not want to take an official position and firmly refused. During the Renshou era, the Imperial Academy was closed down, and Zhang Wenxu returned home using a cane and took up gardening. The local authorities repeatedly tried to recruit him for official positions, but he consistently refused. He was well-known for his filial piety towards his mother. He consistently influenced others through his moral character, and as a result, the customs of the village improved. One night, someone attempted to steal his wheat. He saw it but avoided the thief, who, moved by his actions, left the wheat behind. Zhang Wenxu comforted him, swore not to tell anyone, and let him take the wheat. Years later, the thief himself revealed the incident to the villagers, and it became widely known.

When a neighbor built a wall, Zhang Wenxu thought it was unjust, so he voluntarily tore down his own old wall in response. Zhang Wenxu once suffered from back pain and consulted a doctor who claimed to be highly skilled. However, he was accidentally injured by the doctor’s knife and had to stay in bed. The doctor knelt and begged for forgiveness, but Zhang Wenxu sent him away, concealing the truth and telling his wife, "I felt dizzy yesterday and fell into a pit." He always covered up others' shortcomings. When the local authorities saw that his family was poor and wanted to offer him relief, he firmly refused.

Whenever he had some free time, he would sigh and say, "I worry that my reputation will never take shape!" He would rhythmically tap a ruyi on the table, and people compared him to figures like Min Ziqian and Yuan Xian. He eventually passed away at home at the age of forty. The villagers erected a monument in his honor and called him Mr. Zhang.

Historical records indicate that in ancient times, hermits did not hide away from society, nor were they silent or secretive about their talents. In fact, they were all calm and unpretentious at heart, neither confused nor deluded, able to accept the status quo and be selfless towards all things.

Shi Qian and the others don't care about official positions and titles at all; they only want to withdraw to the countryside. They live in seclusion while honoring filial piety, uphold their integrity while remaining connected to the world, and they don't actively seek to educate others, yet they naturally guide those around them. They may seem unproductive on the surface, but they actually achieve much. They treat the people as they would their own parents, and treat their neighbors as they would their relatives. Who else could achieve this without such pure and noble virtues? Look, Shi Qian is not happy to hear praise, Wen Xu does not get angry when wronged, and Xu Ze seeks solitude, remaining neither too close nor too distant from anyone. No one can render them noble or humble; they are all people with a simple and honest heart. Cui Kuo retired due to being wronged, so he became famous; Zu Jun inherited his father's excellent literary tradition, and although one is active and the other is in seclusion, they both ultimately achieved success. This is truly remarkable!