He hailed from Beidi 北地 (modern Qingyang 慶陽, Gansu) and was an excellent rider and archer during his youth. He was therefore appointed gate-keeper but was soon promoted to governor (taishou 太守) of the commandery of Liaodong 遼東.
After a while he retired and was recommended to the emperor by Xu Jia 許嘉, General of chariots and cavalry (cheji jiangjun 車騎將軍), and appointed Grand Master of Remonstrance (jian dafu 諫大夫), in which position he was sent ou as commandant of cavalry (jiduwei 騎都尉) to the protectorate of the Western Territories 西域. Together with assistant commander (fuxiaowei 副校尉) Chen Tang 陳湯 he killed the Xiongnu 匈奴 khan Zhizhi 郅支, a military effort for which he was appointed Protector-general (duhu 都護) and given the title of Marquis of Yicheng 義成侯.
His posthumous title is Marquis Zhuang 壯侯.