In 738, Li Heng was designated as crown prince and Zhang as his concubine entitled Related Lady of Excellence. In 755, An Lusan launched a rebellion. Emperor Xuanzong fled westwards, followed by Li Heng and Zhang. Zhang asked Emperor Xuanzong to leave the crown prince behind within Hangu Pass, so as to recover Chang’an. In 756, Li Heng mounted the throne in Lingwu, becoming Emperor Suzong. He honored Xuanzong with title of Retired Imperial Father, and designated Zhang as Pure Consort. Staying behind within the Hangu Pass with Li Heng, Zhang worked hard and endured hardships. She happened to be pregnant. Only three days after giving birth to a son, she got up and mended clothes for the soldiers. They all praised her and made every effort in fighting. In 757, Li Heng recaptured Chang’an and the following year, he set up Zhang as empress.