Uncertain. Suggestions include connection with Old Irish cuäch (“cup, goblet, bowl; cauldron, large vessel; bowl, cup”) (whence Scots quaich, queff). The noun is derived from the verb.
Improve your pronunciation
Practice speaking and memorizing "quaff" and many other words and sentences in English.