Du Fu returns to Chang'an as a member of Emperor Xuanzong's court, after having escaped the city during the An Lushan Rebellion.

Emperor Xuanzong of Tang ([wn.ts]; 8 September 685 3 May 762), also commonly known as Emperor Ming of Tang or Illustrious August, personal name Li Longji, was the seventh emperor of the Tang dynasty in China, reigning from 712 to 756 CE. His reign of 44 years was the longest during the Tang dynasty. In the early half of his reign he was a diligent and astute ruler. Ably assisted by capable chancellors like Yao Chong, Song Jing and Zhang Yue, he was credited with bringing Tang China to a pinnacle of culture and power. Emperor Xuanzong, however, because of his interest in his two beloved concubines who were involved in governmental matters (respectively, Consort Wu and later with her death; was succeeded by Consort Yang Guifei's) and was blamed for over-trusting Li Linfu, Yang Guozhong and An Lushan during his late reign, with Tang's golden age ending in the An Lushan Rebellion.

Du Fu (Chinese: 杜甫; Wade–Giles: Tu Fu; 712–770) was a Chinese poet and politician of the Tang dynasty. Along with his elder contemporary and friend Li Bai (Li Po), he is frequently called the greatest of the Chinese poets. His greatest ambition was to serve his country as a successful civil servant, but he proved unable to make the necessary accommodations. His life, like the whole country, was devastated by the An Lushan Rebellion of 755, and his last 15 years were a time of almost constant unrest.

Although initially he was little-known to other writers, his works came to be hugely influential in both Chinese and Japanese literary culture. Of his poetic writing, nearly fifteen hundred poems have been preserved over the ages. He has been called the "Poet-Historian" and the "Poet-Sage" by Chinese critics, while the range of his work has allowed him to be introduced to Western readers as "the Chinese Virgil, Horace, Ovid, Shakespeare, Milton, Burns, Wordsworth, Béranger, Hugo or Baudelaire".