All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad is His slave and Messenger. We ask Allaah to exalt his mention as well as that of his family and all his companions.
Gambling is one of the great major sins and Allaah has described it as the work of the devil and equated it with consuming intoxicants. Allaah says (which means): {O you who believe! Intoxicants (all kinds of alcoholic drinks), gambling, Al Ansaab, and Al Azlaam (arrows for seeking luck or decision) are an abomination of Satan's handiwork. So avoid (strictly all) that (abomination) in order that you may be successful. Satan only wants to cause between you animosity and hatred through intoxicants and gambling and to avert you from the remembrance of Allaah and from prayer. So will you not then desist?}[Quran 5:90-91].
Hence, gambling is a reason of spreading enmity and hatred, and hindering people from the mention of Allaah and the performance of prayer. The Prophet said: "Allaah has forbidden my nation from all kinds of intoxicants and gambling…." [Ahmad] Thus, gambling is forbidden because it causes negligence and affects the heart in the same way intoxicants affect the mind.
Therefore, it is an obligation on whoever is afflicted by it to repent to Allaah and to remember that he will stand in front of Him naked and bare-footed in a day that is 50,000 years long.
Finally, we advise the questioner to continuously advise his friend who is addicted to gambling and remind him of Allaah and His punishment. It might be that he will deter, however, if he does not take heed after being advised, then Allaah says (which means): {And if they turn away-then know that Allaah only intends to afflict them with some of their [own sins]. And indeed, many among the people are defiantly disobedient.}[Quran 5:49]. We ask Allaah to guide us all and rectify our affairs.
Allaah knows best.