I was disobedient; I used to drink wine and I was negligent of the rights of my Lord. Praise be to Allaah, I have repented and I now fulfill all the pillars and obligations of Islam. My question is: When I used to drink, I used to imagine that I was having sexual intercourse with someone. The strange thing is that I used to ejaculate on the bed as if I was actually having sexual intercourse with a girl or anyone I imagined. Have I had sexual intercourse with a jinni? If yes, am I possessed now? How can I get such thoughts out of my head?
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, sallallaahu ‘alayhi wa sallam, is His slave and Messenger.
We ask Allaah Almighty to Keep you steadfast on repentance from consuming alcohol as well as all other sins. We also ask Him to grant you success to remember Him, thank Him and worship Him in a perfect manner. As for what you saw while you were drunk, this is nothing but imagination and satanic whisperings. That is because wine (as well as other types of intoxicants) spoils the mind and renders one unconscious. A drunken person sees things which are untrue. Describing the effect of wine, someone said: "It makes the rooster a donkey and the whiteness of the eye redness." It is also the mother of abominations, as the Prophet, sallallaahu ‘alayhi wa sallam, described it. It is narrated that he said: "Wine is the mother of abominations. Whoever drinks it, his prayers are not accepted for forty days; and whoever dies while he has wine in his belly dies as a non-Muslim." [At-Tabarani in Al-Awsat]
‘Uthman indicated that when he said:
"Avoid wine for it is the mother of abominations. There was a man before you who devoted himself to worship. A prostitute wanted to seduce him. She sent him her slave-girl who said to him: "We invite you to give testimony." He went with that slave-girl who was closing all doors after him until he finally found himself before a beautiful woman, a boy and a jug of wine. The woman said: "By Allaah, I did not invite you to give testimony; but I invited you to either have sexual intercourse with me, drink a cup of this wine or kill this boy." He said: "Give me a cup of this wine." She served him a cup and he asked for another one. Then he had sexual intercourse with her and killed the boy. So, avoid wine, for by Allaah, never do faith and wine addiction gather but one of them is about to expel the other." [An-Nasaa’i; Al-Albaani: authentic]
So, you should avoid whispers and illusions, intensify remembrance of Allaah and obey Him. We ask Allaah to grant us all steadfastness.
Allaah Knows best.
You can search for fatwa through many choices