He was born in modern Hebei around 166. In his hometown, he was either a butcher or a shepherd, but left when work grew scarce. He volunteered in Liu Bei's militia during the Yellow Turban Rebellion, and later joined Liu Bei as a bodyguard. They were separated during Liu Bei's escape from Cao Cao when Zhang Fei moved to fight Xiahou Yuan and Xiahou Shang. They were reunited at the Battle of Chi Bi.
During the Three Kingdoms era, Zhang Fei served as a general under Liu Bei. Although he was a skilled warrior, he was not so skilled as a leader, mostly due to his heavy drinking. He died in 221. His cause of death is not known, however it was likely natural causes or disease. Two officers who wanted to gain favor with Sun Quan later claimed to have killed Zhang Fei.