He hailed from Nanyang 南陽 (modern Fangcheng 方城, Henan) and was a cavalry officer (jilang 騎郎) during the reign of Emperor Wen 漢文帝 (r. 180-157 BCE). For a long time he was not promoted and wanted give up his post in the military, yet he was recommended to Emperor Wen by Yuan Ang 袁盎 and was appointed supervisor of the receptionists (yezhe puye 謁者僕射).
Later on he was promoted to commander of the gate traffic control (gongche ling 公車令). He was demoted when he forgot to get off his chariot when the crown prince was passing by. Emperor Wen nevertheless esteemed him for his service and granted him the rank of an ordinary grand master (zhong dafu 中大夫) and made him later Leader of the court gentlemen (zhonglangjiang 中郎將), later Chamberlain for law enforcement (tingwei 廷尉). Zhang Shizhi was famous for his strict adherence to the laws, a principle that sometimes brought him into conflict with the Emperor's orders. When Emperor Jing 漢景帝 (r. 157-141 BCE) acceded to the throne, Zhang Shizhi was made counsellor (xiangguo 相國) to the Prince of Huainan 淮南. He died in office.