The phrase comes from the Book of Daniel, where King Belshazzar sees a disembodied hand writing on the wall, while he drinks from golden vessels that his father Nebuchadnezzar had stolen from the Temple of Jerusalem after destroying it and enslaving the Jews. He doesn't understand the writing, but Daniel the Hebrew sage does. It is a warning of impending doom, and indeed, later that night Belshazzar is attacked and killed by the Persian emperor Darius.