[3] According to Sima Qian, after his father's death, Zhang Tang became a clerk in Chang'an and served as an aide to Ning Cheng in the office of the prefect of the capital.
When dealing with those from prominent families, he had a habit of twisting the law to ensure that they were proven guilty, but often asked the Emperor for leniency in the cases of those from humble backgrounds, with the result that many in the latter category were spared.
Ultimately, he reached the rank of imperial secretary, and at one stage, he became so influential that all matters of state were decided upon by him, with the chancellor relegated to the status of a mere figurehead.
Under the direction of the Emperor, Zhang Tang arranged for the minting of new currency and the nationalisation of the salt and iron industries, which had hitherto been in the hands of wealthy merchants.
Through his habit of paying calls on others even in the face of inclement weather, he was able to win widespread fame in spite of the severity and questionable objectivity of his legal work.
Despite knowing that the charges had been trumped up by Lu Yeju, Zhang Tang nevertheless pleaded ignorance when asked by the Emperor on who he thought to be responsible for bringing forth this accusation, responding by saying that it was probably the work of some old enemy of Li Wen's.
He suggested to the Emperor that the fact that an official as high-ranking as Zhang Tang had visited and even massaged his secretary's legs was a sign that the two were engaged in planning some great crime.
It so happened that on one occasion, Zhang Tang was interviewing another prisoner held at the same place but pretended not to recognise Lu Yeju's brother as he hoped to use underhanded means to assist him.
However, the latter was oblivious to these intentions and resented being ignored, so he revealed to the throne that Zhang Tang and Lu Yeju had been responsible for the false charges against Li Wen.
Zhang Tang was tasked with the investigation afterwards and made such an attempt to prove that Qing Di had intentionally neglected to report the incident that the latter felt threatened.
Zhao Yu berated Zhang Tang, saying that he ought to understand his own situation given that he had inflicted it upon so many others, and that the Emperor did not want to haul him off to prison but rather hoped that he would end his own life.
Thus convinced, Zhang Tang penned a letter apologising for his failures and accusing the chancellor's three chief secretaries of causing his ruin, then committed suicide.
[3] Despite his brothers' and sons' wish for an extravagant funeral, his mother objected on the basis that his negative reputation did not warrant one, and so he was taken to the cemetery in an ox cart and buried without an outer coffin.