I prepare it as a medicine, whereupon he (the Holy Prophet) said: It is no medicine, but…

Sahih Muslim Book 36 Hadith 15

Sahih Muslim #1984

The Book of Drinks 36:15

Wa'il al-Hadrami reported that Tariq b. Suwaid a-Ju'fi asked Allah's Apostle (ﷺ) about liquor. He forbade (its use) and he expressed hatred that it should be prepared. He (Tariq) said:

I prepare it as a medicine, whereupon he (the Holy Prophet) said: It is no medicine, but an ailment.

Chapter: The prohibition of using Khamr as a remedy; It is not a remedy

Grade: Sahih