Darius the Mede is mentioned in the Book of Daniel as king of Babylon between Belshazzar and Cyrus the Great, but he is not known to history, nor can he be fitted between the known figures of Belshazzar and Cyrus. The book of Daniel does not mention the duration between chapters 5 and 6 however. Most scholars view him as a literary fiction, but conservatives seeking to harmonise Daniel with history have put forward several theories, the most common being that he is identical with either Cyrus or with Ugbaru, the general who was first to enter Babylon when it fell to the Persians in 539 BCE.
Darius the Mede is first mentioned in the story of Belshazzar's feast (Daniel 5). Belshazzar, king of Babylon, holds a great feast for his lords, but in the midst of the revelries a hand appears and writes on the wall: MENE, MENE, TEKEL, PARSIN. Daniel interprets the mysterious words: Belshazzar has been weighed and found wanting, and his kingdom is to be divided between the Medes and Persians. The story concludes: "That very night Belshazzar the Chaldean (Babylonian) king was killed, and Darius the Mede received the kingdom."
In the story of Daniel in the lions' den (Daniel 6), we learn that Daniel has continued to serve at the royal court under Darius, and has been raised to high office. His jealous rivals plot his downfall, tricking Darius into issuing a decree that no prayers should be addressed to any god or man but to Darius himself, on pain of death. But Daniel continues to pray to the God of Israel, and Darius, although deeply distressed, must condemn him to be thrown into the lions' den, for the edicts of the Medes and Persians cannot be altered. At daybreak the king hurries to the place and cries out asking if God had saved his friend, and Daniel replies that his God had sent an angel to close the jaws of the lions "because I was found blameless before him." Darius commands that those who had conspired against him should be thrown to the beasts in his place, along with their wives and children.
The final appearance of Darius is in Daniel 9. This chapter records a vision of Daniel relating to the end-time travails and triumph of the Israelites over their enemies, and the mention of Darius is simply a chronological marker: the vision, the reader is told, was sent to Daniel in "the first year of Darius son of Ahasuerus" (the Hebrew form of Xerxes).