Zhang Bi was born in Huating county in Songjiang (today’s Song Jiang District in Shanghai). His courtesy name was Rubi and literary name Donghai. He also referred to himself as Donghaiweng in his later years. He passed the Imperial Exam in the second year of the Chenghua Period under the reign of Emperor Xianzong (1466) and served as Secretory (zhushi) in the Ministry of War (bingbu) and then got promoted. He was later appointed as Prefect (zhifu) of Nanan County in Jiangxi province and made exemplary achievements during his term. Zhang was a calligrapher famous for his cursive script. He was also accomplished in poetry and prose writing. He was the author of a number of books including five volumes of The Collected Works of Zhang Donghai (donghaiwenji), The Catalogue of The Complete Collection of the Four Treasuries (sikuzongmu), and Scripts in Hecheng (hechenggao).