Famous for his expertise in penal law, he was made a servant of crown prince Liu Qi 劉啓, the future Emperor Jing 漢景帝 (r. 157-141 BCE). Acceeded to the throne, Liu Qi made him one of the Nine Chamberlains (jiuqing 九卿). In 140, Zhang was appointed Commandant of the capital (zhongwei 中尉), in 131 to the post of Censor-in-chief (yushi dafu 御史大夫). Zhang Ou was known for his rightenousness and fairness. Emperor Wu highly esteemed him, and after Zhang Ou retired, the emperor granted him the income of a Senior Grand Master (shang dafu 上大夫).