Du was a native of Gongxian in Henan province, who endured great hardships to move to Chengdu in 759, via Gansu province, as a refugee of an eight-year war started by two rebel generals in 755. On his way to defect to the emperor in today's Ningxia Hui autonomous region in 756, he was captured by rebels and taken to Chang'an. He managed to flee nearly one year later.
Seeing how Chang'an was ravaged by the rebel army, in February 757, Du wrote Spring View, while still in their custody. The melancholy poem describing his care for state affairs and concern for his loved ones reads thus:
Third month and still beacon fires flare,
Words from home would be worth their weight in gold.
The poet found peace at the Chengdu cottage for three years and nine months, penning 240 of his 1,455 poems.
His poem Good Rain on a Spring Night, written in 761, is prescribed reading for Chinese pupils.