Belshazzar, king of Babylon. You can read the story in Daniel 5:1-30.
Meaning: The words themselves are the names of currency with "mene" being a mina, "tekel" a shekel, and "parsin" or "peres" (the singular) a half a mina.
Daniel interpreted the meaning for the king to be as follows:
Mene--God has numbered the days of your kingdom and brought them to an end.
Tekel--You have been weighed on the scales and found wanting.
Peres (sing. of Parsin)--Your kingdom is divided and given to the Medes and Persians
Language: Aramaic
Above is the depiction of the scene by Rembrandt.
The story is also captured in the oratorio by Handel titled Belshazzar.
The story so captured the imagination that it became a metaphor for realizing that an outcome is doomed. We say "I can see the writing on the wall" to acknowledge that the negative outcome is a foregone conclusion.