Hadithcore
Hadith #2115320

Mu'awiyah (RAA) narrated that the Messenger of Allah (ﷺ) said regarding the one who drinks alcohol, 'If he drinks (for the first time) flog him, then if he drinks for the second time flog him, then if he drinks for the third time flog him then if he drinks for the fourth time you should kill him." Related by Ahmad and the wording is his. It is also transmitted by the four Imams.

وَعَنْ مُعَاوِيَةَ ‏- رضى الله عنه ‏- عَنْ اَلنَّبِيِّ ‏- صلى الله عليه وسلم ‏-أَنَّهُ قَالَ فِي شَارِبِ اَلْخَمْرِ: { إِذَا شَرِبَ فَاجْلِدُوهُ, ثُمَّ إِذَا شَرِبَ [ اَلثَّانِيَةِ ] فَاجْلِدُوهُ, ثُمَّ إِذَا شَرِبَ اَلثَّالِثَةِ فَاجْلِدُوهُ, ثُمَّ إِذَا شَرِبَ اَلرَّابِعَةِ فَاضْرِبُوا عُنُقَهُ } أَخْرَجَهُ أَحْمَدُ وَهَذَا لَفْظُهُ, وَالْأَرْبَعَة ُ [1]‏ .‏

References2 variants
Sunnah.com reference
Book 10, Hadith 41
Arabic/English book reference
Book 10, Hadith 1282