He hailed from Zuli 祖厲 (near modern Jingyuan 靖遠, Gansu) and was a nephew of cavalry general (piaoji jiangjun 驃騎將軍) Zhang Ji 張濟, a high officer of the usurper Dong Zhuo 董卓. For his merits during a series of campaigns he was given the title of General establishing loyalty (jianzhong jiangjun 建忠將軍) and was given the title of Marquis of Xuanwei 宣威侯. When Zhang Ji died, his nephew took over his troops and garrisoned them in Wan 宛 (modern Nanyang 南陽, Henan).
He first allied with general Liu Biao 劉表 and later offered support to the warlord Cao Cao, although he hated the potentate because Cao Cao had taken Zhang Ji's wife into his harem. He therefore withdrew to Baorang 保穰 and refused to cooperate further with Cao Cao. Yet the battle of Guandu 官渡 (near modern Zhongmou 中牟, Henan), where Cao Cao fought against Yuan Shao 袁紹, Zhang Xiu adopted the plan of Jia Xu 賈詡 and again offered his service to Cao Cao. The latter made him General spreading martiality (yangwu jiangjun 揚武將軍) and greatly profited from Zhang Xiu's assistance for his victory at Guandu.
Zhang was rewarded with the title of General crushing the Qiang barbarians (po Qiang jiangjun 破羌將軍) and was ordered to campaign against Yuan Shao's son Yuan Tan 袁譚. He died on the way to a campaign against the nomad federation of the Wuhuan 烏桓. His posthumous title is Marquis Ding 定侯.