He was an official when he was young, but later he didn't like the darkness of officialdom and became a hermit.
From his biography of Mr. Wuliu, it can be reflected that he didn't bend down for five buckets of rice, and the times at that time were quite bad.
He also wrote the famous Peach Blossom Spring, which depicts an ideal society and shows his seclusion.
So, I guess the reasons for his seclusion are as follows:
1. It was troubled times and a period of rapid dynasty change. There must be constant disputes, and the Song Dynasty in the Southern Dynasties is also in jeopardy. As a small official, he naturally saw more dark reality.
2. Tao Yuanming's family was originally poor, and the poor people certainly had a hard time at that time.
Tao Yuanming suffered great setbacks. First of all, if he doesn't like those customs, he should stand up and criticize them. But because there was no place for him to speak, he wanted to serve the country but was blocked, so he finally chose to give up, resulting in his seclusion.
Since he can't realize his idea in reality, he can only choose to quit and go to a place where he started from scratch, away from these dirty things.
Just a personal understanding, I hope it will help you.