There are many inconsistencies and grammatical problems in the Hebrew text, and in its present form, the book was probably edited soon after the prophet’s death, some time after 571 BCE, the date of the last prophecy. (Nothing is recorded in the OT of his death, but a later tradition has it that he was murdered and buried near Babylon.)
The book divides into three sections: chs. 1–24 are messages of judgement upon Judah before the fall of the capital and an expression of the grief of Yahweh over the nation’s idolatry, symbolized by the infidelity of a wife (16: 23). This leads to an utterance of doom upon the Temple (24: 21) symbolized by the death of the ‘delight of my eyes’ (24: 15), his wife (24: 18). Some of Ezekiel’s metaphors and images are bizarre, even grotesque, and may render the book uncomfortable reading in the 21st century, especially for women. Chs. 25–32 are oracles against foreign nations, and chs. 33–48 are about the future restoration of the people in the promised land. The final section (chs. 40–48) contains detailed plans for the new Temple and its staff of priests of the line of Zadok (to which Ezekiel himself belonged); thus it was the foundation for later Judaism. These nine chapters are often held to be a late addition; but the vision of Yahweh’s return and re-enthronement is a satisfying conclusion and fits well into the rest of the book.