Under what background did Qu Yuan write the long poem Tian Wen?

Around 297 BC, Qu Yuan returned to Du Ying. Being placed under house arrest by the State of Qin, the Chu royal family established a new king, called Xiang Wang. The alternation of old and new monarchs did not change Qu Yuan's fate. For Qu Yuan who died for his country, Xiang Wang not only did not reuse it, but once again expelled it from the capital and exiled it to Jiangnan. Jiangnan here includes southern Hubei Province and northern Hunan Province. Most of them were underdeveloped areas at that time. Qu Yuan lived a life of poverty and illness here, and wrote a magnificent and peculiar poem "Tian Wen".