Prohibiting Khamr (Intoxicants) and Maysir (Gambling)
Allah says;
يَا أَيُّهَا الَّذِينَ امَنُواْ إِنَّمَا الْخَمْرُ وَالْمَيْسِرُ وَالَانصَابُ وَالَازْلَامُ
O you who believe! Khamr, Maysir, Ansab, and Azlam are,
Allah forbids His believing servants from consuming Khamr and Maysir which is gambling.
Ibn Abi Hatim recorded that Ali bin Abi Talib, the Leader of the Faithful, said that;
chess is a type of gambling.
Ibn Abi Hatim recorded that Ata, Mujahid and Tawus, or , two of them, said that;
every type of gambling, including children's playing with (a certain type of) nuts, is Maysir.
Ibn Umar said that;
Al-Maysir means gambling,
and this is the same statement that Ad-Dahhak reported from Ibn Abbas, who added,
"They used to gamble during the time of Jahiliyyah, until Islam came. Allah then forbade them from this evil behavior."
Meaning of Ansab and Azlam
According to Ibn Abbas, Mujahid, Ata', Sa`id bin Jubayr and Al-Hasan,
Al-Ansab were altar stones, in whose vicinity sacrifices were offered (during the time of Jahiliyyah).
As Ibn Abi Hatim narrated they also said that;
Al-Azlam were arrows that they used for lotteries to make decisions.
Allah said,
رِجْسٌ مِّنْ عَمَلِ الشَّيْطَانِ
A Rijs of Shaytan's handiwork,
meaning, abomination of Shaytan's handiwork, according to Ali bin Abi Talhah who reported it from Ibn Abbas.
Sa`id bin Jubayr said that;
Rijs means `sin'.
while Zayd bin Aslam said;
"An evil handiwork of Shaytan."
فَاجْتَنِبُوهُ
So avoid that,
avoid all of these abominations,
لَعَلَّكُمْ تُفْلِحُونَ
in order that you may be successful.
and this is a statement of encouragement.
Allah said next,
إِنَّمَا يُرِيدُ الشَّيْطَانُ أَن يُوقِعَ بَيْنَكُمُ الْعَدَاوَةَ وَالْبَغْضَاء فِي الْخَمْرِ وَالْمَيْسِرِ وَيَصُدَّكُمْ عَن ذِكْرِ اللّهِ وَعَنِ الصَّلَةِ فَهَلْ أَنتُم مُّنتَهُونَ