Zhang Yao'er was from Wuxing Commandery (吳興, roughly modern Huzhou, Zhejiang). Her father Zhang Jingming (章景明) was originally surnamed Niu (鈕), but was adopted by a family named Zhang, and therefore had his name changed. Her mother was named Su (蘇), but her mother's surname is not known to history. Zhang Yao'er was not Chen Baxian's first wife, as Chen had initially married a daughter of Qian Zhongfang (錢仲方), who, like Chen and Zhang, was from Wuxing Commandery, but Lady Qian died early, so he married Zhang after Lady Qian's death. Zhang Yao'er was described as being well-versed in mathematics, poetry, and the Chu Ci. She bore Chen at least one son, Chen Chang, but it is not known whether any other of his at least five other sons (none of whom survived to adulthood) or either of his two known daughters, the Princess Kuaiji and Yongsi, was hers.
In 545, with Jiao Province (交州, modern northern Vietnam) seized by the rebel Li Ben, Chen Baxian, then a Liang Dynasty general, was sent to Jiao Province to battle Li; at that time, rather than taking Lady Zhang and Chen Chang with him, he sent them back to Wuxing. After the general Hou Jing rebelled in 548 and subsequently captured the capital Jiankang in 549, both she and Chen Chang were taken captive by Hou, but despite Chen Baxian's subsequent major participation in the campaign against Hou, Hou did not kill her or Chen Chang. After Hou was defeated in 552, Emperor Yuan of Liang created Chen Baxian the Duke of Changcheng for his contributions, and Lady Zhang became the Duchess of Changcheng. Her son Chen Chang, despite his young age (15), was made the governor of Wuxing Commandery, but subsequently was summoned by Emperor Yuan, along with Chen Baxian's nephew Chen Xu, to the new capital Jiangling, to serve at the central government and to effectively serve as hostages. In 554, after Jiangling was captured by Western Wei forces, Emperor Yuan was executed, while Chen Chang and Chen Xu were taken as honored captives to the Western Wei capital Chang'an.
After Jiangling's fall, the supreme general of the remaining Liang territory, Wang Sengbian, along with Chen Baxian, who was then in charge of Jingkou (京口, in modern Zhenjiang, Jiangsu), prepared in spring 555 to make Emperor Yuan's son Xiao Fangzhi the Prince of Jin'an, emperor, but subsequently, under military pressure from Northern Qi, Wang accepted Northern Qi's proposed candidate for the throne, Emperor Yuan's cousin Xiao Yuanming the Marquess of Zhenyang. In fall 555, however, Chen made a surprise attack on Jiankang, killing Wang and deposing Xiao Yuanming, declaring Xiao Fangzhi emperor instead (as Emperor Jing). In the next two years, Chen defeated Northern Qi forces and affirmed his grip on power, taking the throne from Emperor Jing in 557 and establishing Chen Dynasty (as Emperor Wu). He created her empress and created her mother as the Marchioness of Anji. Emperor Wu made repeated requests to Western Wei's successor state Northern Zhou to have Chen Chang and Chen Xu returned, but Northern Zhou, despite initially agreeing, never actually freed Chen Chang or Chen Xu.
In 558, the Marchioness of Anji died, and Emperor Wu subsequently posthumously created Zhang Jingming the Marquess of Guangde, burying the marchioness with him with honors.
In 559, Emperor Wu suffered a major illness and died quickly. At that time, Emperor Wu's nephew Chen Qian the Prince of Linchuan, the only close male relative of Emperor Wu then in Chen territory, was constructing a fort at Nanhuan (南皖, in modern Anqing, Anhui), and Empress Zhang, after consulting the officials Du Leng (杜稜) and Cai Jingli (蔡景歷), chose not to announce Emperor Wu's death, and they secretly summoned Chen Qian back from Nanhuan. Chen Qian soon returned to Jiankang, with the general Hou Andu. Hou and the officials subsequently decided to support Chen Qian as emperor, but Empress Zhang was still hopeful that Chen Chang would return, and therefore refused to allow Chen Qian to inherit the throne. Hou approached her and, with his hand on the handle of his sword, requested that she turn over the imperial seal. She finally agreed, and Chen Qian took the throne (as Emperor Wen).
Emperor Wen honored Empress Zhang as empress dowager, and she took up residence at Cixun Palace (慈訓宮). She did not appear to have much power during Emperor Wen's reign, and in 560, when Chen Chang returned from Northern Zhou and made suggestions that he would contest the throne, Emperor Wen had him drowned. In 566, Emperor Wen died and was succeeded by his son Emperor Fei, who honored her as grand empress dowager. In 569, when Chen Xu (who had by this time returned from Northern Zhou as well) seized the throne from Emperor Fei, he had the edict deposing Emperor Fei and making him emperor (as Emperor Xuan) issued in her name, although there is no evidence suggesting that she was actually involved in Emperor Xuan's seizure of the throne. After Emperor Xuan took the throne, she was again titularly empress dowager. She died in 570 and was buried with honors due an empress, with her husband Emperor Wu.