Zhang Han was first a sub-general of Chamberlain for the Capital (neishi 內史) Teng 騰 and general Wang Jian 王翦, under which he took part in the conquest of the states of Han 韓 and Zhao 趙. During the reign of the Second Emperor of Qin 秦二世皇 (r. 209-207 BCE), he was appointed Chamberlain for the Palace Revenues (shaofu 少府).
In 208, he was dispatched to Mt. Lishan 驪山 to defend this place, where the tomb of the First Emperor 秦始皇帝 (r. 246-210 BCE) was located, against the rebels under Chen Sheng 陳勝. Zhang Han attacked and killed some of the feudal lords established in the chaos of the rebellion, like Wei Jiu 魏咎, the king of Wei 魏, Tian Dan 田儋, the king of Qi 齊, and general Xiang Liang 項梁. He encircled the city of Julu 巨鹿 (modern Pingxiang 平鄉, Hebei), besieging King Xie 歇 of Zhao.
When Zhang Han was defeated by Xiang Yu, he used this moment to submit to the new potentate of China because he clearly felt the danger threatening his further career at the Qin court, where the eunuch Zhao Gao 趙高 had a tight grip on the Second Emperor. For his submission, Zhang Han was enfeoffed as king of Yong 雍, with the residence at Feiqiu 廢丘 (modern Xingping 興平 Shaanxi).
Soon after, Liu Bang 劉邦, the eventual founder of the Han dynasty 漢 (206 BCE-220 CE), conquered the region of Guanzhong 關中, besieged Feiqiu and deviated a river to inundate the city. Zhang Han commited suicide rather than again surrending.