This site, now the Xingqing Palace Park, initially was the official residence of Li Longji when he was made the crown prince. Later, in 712, he became the Tang-Dynasty Emperor Xuan Zong and his former residence was refurbished as his palace.
It was here that Li Bai entertained Emperor Xuan Zong with poetry and brilliant conversation during Li's short tenure as Xuan Zong's 'court jester'.
Here, Emperor Xuan Zong once granted an interviews to Persian Nestorian priests and Japanese visitors. After AnShi Rebellion (the rebellion by An Lushan and Shi Siming, Xingqing Palace lost its importance in politics and became the palace where Emperor Xuan Zong lived after his abdication. The Palace was mostly destroyed by war in the late Tang Dynasty and remained in ruins until the beginning of the Ming Dynasty.