The story comes from Daniel, Chapter 5. In the midst of a drunken feast, the king of Babylon, Belshazzar, orders that the sacred vessels looted from the Temple in Jerusalem be brought in so that the king and his court could drink from them, using the holy things of the Jewish god in order to toast their own idols:
So they brought in the gold goblets that had been taken from the temple of God in Jerusalem, and the king and his nobles, his wives and his concubines drank from them. As they drank the wine, they praised the gods of gold and silver, of bronze, iron, wood and stone.An eerie, disembodied hand then appears and writes four words in Aramaic on the wall of the banquet room: MENE MENE TEKEL PARSIN. The four words are Aramaic standards of currency: mena, "numbered," which is 30 shekels (compare Greek mina, equivalent to 100 drachmas), tekel (compare the related word, shekel), which also means "weighed," and peres, "divided," which is half a mena.
To see how the name of a coin can also have a meaning of its own, think about the English "quarter," which refers both to a coin worth 25 cents, but which also refers to the "quartering" of anything, so you can have quarters in your pocket, but you can also be assigned to living quarters, where you spend a quarter of your day, etc. Likewise, the word "dime" actually means "tenth" (from Latin decimum).
King Belshazzar is baffled and terrified by this message, and none of his wise men are able to interpret the meaning for him. Finally, Belshazzar summons Daniel who is able to interpret the message:
You did not honor the God who holds in his hand your life and all your ways. Therefore he sent the hand that wrote the inscription. This is the inscription that was written: Mene , Mene , Tekel , Parsi. This is what these words mean: Mene: God has numbered the days of your reign and brought it to an end. Tekel: You have been weighed on the scales and found wanting. Peres: Your kingdom is divided and given to the Medes and Persians."In Daniel's interpretation, parsin is not only a unit of currency known as the "division," but it is also a pun on the Persians.
It does not take long for events to confirm Daniel's interpretaton. That same night, King Belshazzar is assassinated and Darius the Medes becomes king. Accordingly, the "writing on the wall" has become a proverbial phrase in English, referring to some kind of impending disaster or doom.
The image I chose for this story is a painting by Rembrandt's Belshazzar's Feast (1635). The Hebrew letters appear in columns, reading top to bottom and then right to left, instead of simply right to left, line by line, as would be normal with Hebrew. Rembrandt apparently transcribed the Hebrew letters from a book by Menasseh ben Israel, a Jewish rabbi and printer with whom Rembrandt was friends. Ben Israel founded the first Hebrew printing press in Amsterdam in 1626 and was an altogether fascinating character! You can read more about Menasseh ben Israel at wikipedia.