It is not known when Zhang Lihua was born. She was the daughter of a soldier, but her family was so poor that her father and older brother had to support the family by sewing seating pads. After Chen Shubao became crown prince in 569 after his father Emperor Xuan took the throne, she was initially selected into the palace to serve as a servant to his concubine Consort Gong. When Chen Shubao saw her, however, he was infatuated with her and took her as a concubine. She bore two sons -- Chen Yuan and Chen Zhuang (陳莊). (It is not clear whether she bore any of his at least six daughters.)
Emperor Xuan died in 582, and Chen Shubao, after surviving a coup attempt by his brother Chen Shuling (陳叔陵) the Prince of Shixing and cousin Chen Bogu (陳伯固) the Prince of Xin'an, took the throne. Chen Shubao created his wife Crown Princess Shen Wuhua empress, and created Consort Zhang an imperial consort with the honored title of Guifei (貴妃) -- the highest rank for imperial consorts. In the coup attempt, Chen Shubao suffered serious injuries, and Consort Zhang attended to him in the illness, as he did not favor Empress Shen and did not allow Empress Shen to attend to him. She became even more favored than before, and she effectively became the ruler of his palace notwithstanding that Empress Shen was empress.
Chen Shubao had a large number of concubines—10 of whom were said to be favored—but Consort Zhang continued to be his favorite. He constructed three particularly luxurious pavilions within his palace—Linchun Pavilion (臨春閣), Jieqi Pavilion (結綺閣), and Wangxian Pavilion (望仙閣), residing himself at Linchun Pavilion, while having Consort Zhang reside at Jieqi Pavilion and Consorts Gong and Kong share Wangxian Pavilion. He often spent his days feasting with his concubines, headed by Consort Zhang, as well as those ladies in waiting and officials who had literary talent, having those officials sing or write poetry to praise his concubines' beauty. Two of the particularly known songs, Yushu Houting Hua (玉樹後庭花) and Linchun Yue (臨春樂), were written to praise the beauties of Consorts Zhang and Kong.
Consort Zhang was said to be particularly capable at dressing herself and decorating herself beautifully, as well as engaging witches to pray to gods to help her stay beautiful. At times, her beauty was compared to goddesses. As Chen Shubao was not much interested in the matters of state, whenever he had important petitions to decide on, he would hold Consort Zhang on his lap and have her read the petition and rule on it. She therefore became very powerful politically as well, and so she and Consort Kong (who, while not related to the high-level official Kong Fan (孔範), referred to Kong Fan as her brother) became ones that people would bribe and beg when they had special requests. The officials soon were forced to first discuss important matters with Consorts Zhang and Kong before they could discuss them with the emperor.
Because of Chen Shubao's favor for Consort Zhang, he also most favored her sons Chen Yuan and Chen Zhuang among his sons. In 588, he deposed his oldest son and crown prince Chen Yin because he suspected Chen Yin (who, while not born of Empress Shen, was raised by her and considered her son) of despising him for not favoring Empress Shen. He replaced Chen Yin with Chen Yuan.
In 589, the Sui dynasty launched a major attack, and with Chen Shubao not paying attention to his generals requesting aid, Sui forces were quickly able to reach and capture the Chen capital Jiankang. Chen Shubao and Consorts Zhang and Kong hid in a well, but were eventually found and taken captive. Chen Shubao was spared (and eventually treated with kindness by Emperor Wen of Sui), as were Chen Yuan and Chen Zhuang, but the Sui general Gao Jiong, blaming her for Chen's collapse and comparing her to Daji, the wicked wife of King Zhou of Shang who was beheaded by the Zhou dynasty general Jiang Ziya after Zhou conquered Shang, beheaded her despite an order from Emperor Wen's son Yang Guang the Prince of Jin, who commanded the entire operation, to spare her. (Whether Yang Guang wanted to seize her as his own concubine can only be speculated.) In 607, after Yang Guang had succeeded Emperor Wen in 604 (as Emperor Yang), he executed Gao after Gao who had expressed disagreement with him on the large amount of award that he was giving to Tujue's submissive Qimin Khan. Many traditional historians believed that he was punishing Gao for having executed Consort Zhang despite his order.