It is narrated from Qabeesah bin Dhu’ayb (may Allah be pleased with him) that the Prophet (ﷺ) said: “If someone drinks alcohol, flog him. If he drinks again, then flog him again. If he drinks again, then flog him again. If he still drinks, then kill him.” Az-Zuhri (may Allah have mercy on him) did not know whether the Prophet (ﷺ) gave the order to kill after the third or the fourth time. Then a man was brought who had drunk alcohol and the Prophet (ﷺ) had him flogged. Then he was brought again and the Prophet (ﷺ) had him flogged again. Then he was brought again for drinking alcohol and the Prophet (ﷺ) had him flogged again and did not kill him, and this became a concession (from killing).
Hadith Referenceمسند الإمام الشافعي / كتاب الحدود / 1560
Hadith Takhrijصحیح اخرجه ابوداود ، الحدود، باب اذا تتابع في شرب الخمر (4485) والترمذی، الحدود، باب ماجاء من شرب الخمر فاجلدوه ومن عاد في الرابعة فاقتلوه بعد الحديث (1444)۔