The Prophet ﷺ said, "Whoever plays with dice is as though he has dipped his hand in the flesh and blood of a pig."
حدثنا مسدد حدثنا يحيى عن سفيان عن علقمة بن مرثد
عن النبي ﷺ قال من لعب بالنردشير فكأنما غمس يده في لحم خنزير ودمه
Muslim narrated it in the Book of Poetry, chapter on the prohibition of playing backgammon, no. 2260, from the hadith of Sufyan Thawri through this route.