Gongsun Zan was born to a family of high officials and received education from Lu Zhi and Liu Kuan, in the process becoming friends with Liu Bei. He took office as a local officer in Liaoxi Commandery, where the administrator was so impressed with his appearance and booming voice that he gave his daughter to him in marriage. Later on, Zan became assistant magistrate of a county in Liaodong Commandery and made a name for himself fighting the Wuhuan and Xianbei. He was particularly known for leading a unit of mounted archers who only rode white horses. It was said that he was so well known among the Xianbei that they used his image for target practice. Despite Zan's success in halting Xianbei raids on Han territory, he was dismissed for losing a large portion of his men in an attack against numerically superior forces. Zan was eventually reappointed and given command of Wuhuan auxiliaries in 187 to deal with the Liang Province rebellion. For his service he was promoted to Commandant of Cavalry and went on to defeat the rebels Zhang Ju, Zhang Chun, and the Wuhuan chieftain Qiuliju in 188. However Qiuliju escaped and surrendered to the governor of You Province, Liu Yu. Liu Yu was rewarded with rank and enfeoffment, making Zan resentful of him.