Babylon fell to Persia (Daniel 5:25-31). Cyrus king of Persia gave the Israelites permission to return to Israel with their property. They rebuild the alter and start rebuilding the temple in chapter 3. There is opposition, but rebuilding is completed and dedicated in chapter 7. Intermarriage is a problem!
There was opposition, so they worked hard and completed the wall in 52 days (6:15). In chapter 8 Ezra reads the book of the Law. In chapter 9 the people confess their sins and praise God. In chapter 10 the people agree to follow the law of God.
The book of Esther is after Nehemiah in the Bible, but the events of Esther happen earlier and help to make the work of Nehemiah possible.
*Note: Ezra to the end of the Old Testament is not in chronological order. This can be confusing at times!