All perfect praise be to Allah, The Lord of the Worlds. I testify that there is none worthy of worship except Allah, and that Muhammad is His slave and Messenger.
A person in a state of Janabah (state of sexual defilement) is not permitted to recite the Quran until he purifies himself [i.e, performs Ghusl], according to the most correct opinion.
‘Ali said: “The Prophet used to teach us the Quran except when he was in a state of sexual impurity.” [Ahmad, Abu Dawood, Ibn Majah, An-Nasa’i and At-Tirmidhi] This is the version of At-Tirmidhi who graded it authentic and Ibn Hajar ruled that it is authentic as well.
Therefore, if a person does that, he has made a mistake, but this act does not take him out of the fold of Islam. Rather, some scholars are of the view that there is no harm in doing so. In addition, Al-Bukhari said in his Saheeh: “Ibn ‘Abbas did not see any harm in someone reciting (the Quran) while he is junub (i.e., in a state of sexual defilement).” Moreover, Ibn Hazm mentioned in Al-Muhalla that Rabee`ah said: “There is no harm for the junub to recite the Quran.”
Nevertheless, the view of the majority of the scholars who prohibit this is more preponderant.
Allah knows best.