The eszett originated as a digraph unsurprisingly called “sz” in late medieval and early modern German orthography. It later became a ligature of the letter “long s” or ſ, and the “tailed z” or ʒ. But the creation of this letter has to be in response to something, right?
It turns out that in High German’s history, there was a consonant shift that started sometime between the third and fifth centuries, and concluded around the eighth century. Old High German developed a sound that was spelled “zz” or “z”, but pronounced as [s], and also a sound proposed to be spelled “s” but pronounced as [ɕ] or [ʒ].
The issue was, the letter “z” also represented the sound [ts], as it still does today. And so, speakers of Old High German had to come up with something to differentiate between these sounds. Thus, the sound for [s] in this case was spelled “zss” or “zs”, as in wazsser, or Wasser today (water).
A few centuries later, in the 13th century, a phonetic shift happened. The difference between [z] and [s] was lost in the beginning and the end of words across nearly all dialects. The Old-Middle High German “s” was pronounced as [z], while the “z” continued to be pronounced as [s]. In some texts, however, this [s] sound was quite often spelled as “sz” or “ss”.
This is where we find the first signs of the eszett, literally “sz”. Born as a ligature of the two letters, the eszett was initially written by combining the long “s” with the tailed “z”. The earliest known appearance of this particular letter is from a manuscript from the year 1300, of the poem Wolfdietrich. In fact, the way this letter was employed back then was based on phonetics than etymology, and by the early 16th century, more words began to be distinguished from each other, notably das (meaning “the”, or pronoun “that”) and daß (meaning the conjunction “that”).
Wolfdietrich
After twelve years of marriage, Wolfdietrich moves to a monastery, where devils torment him until his death.

Under construction!