The books in the English Bible follow a subject arrangement and are not in the order they were written. The arrangement mirrors that of the Septuagint, a Greek translation of the Old Testament made a few hundred years before Christ.
The Hebrew Old Testament follows a slightly different order than the English. If you compared a Hebrew Old Testament with our English Bible, you would see that the table of contents lists only twenty-four books. At first glance, you might think some books are missing, but those twenty-four contain the same material as our thirty-nine.
The Jews arranged the books according to the official status of the writers: Moses; the prophets; and the other writers. If that arrangement sounds familiar, it should, Jesus mentioned it in Luke 24:44, "These are the words which I spoke to you while I was still with you, that all things must be fulfilled which were written in the Law of Moses and the Prophets and the Psalms concerning Me."
Here's the order of books in the Hebrew Bible:
- The Law of Moses:
Genesis, Exodus, Leviticus, Numbers, and Deuteronomy - The Prophets:
The Former Prophets: Joshua, Judges, Samuel, and Kings
The Latter Prophets: Isaiah, Jeremiah, Ezekiel, and "The Twelve" (Minor Prophets) - The Writings:
Poetical Books: Psalms, Proverbs, and Job
The Five Scrolls: Song of Solomon, Ruth, Lamentations, Ecclesiastes, and Esther
The Historical Books: Daniel, Ezra, Nehemiah, and Chronicles
The New Testament order is also based on subject categories. First come the historical books--the gospels and Acts. Then come the epistles--first those from Paul, then those written by the other writers. Revelation comes at the end.
The early church always grouped the gospels with Matthew first, followed by Mark or Luke, then the gospel of John. It also arranged the Pauline epistles in two categories--first the epistles to the churches, then the personal letters. It typically arranged those epistles according to size or length. The personal letters and general epistles (non-Pauline writings) appear to follow that arrangement--Hebrews first, followed by the writings of James, Peter, John, and Jude.