Sahih Muslim Book 1, Hadith Number 104.

Chapter : Concerning diminution of Belief due to sins and its separation from the sinner; negation of the excellence of Islam at the time of committing sin.

Abu Huraira reported that the Messenger of Allah observed: The fornicator who fornicates is not a believer so long as he commits it and no thief who steals is a believer as long as he commits theft, and no drunkard who drinks wine is a believer as long as he drinks it. ‘Abdul-Malik b. Abi Bakr’ narrated this on the authority of Abu Bakr b. Abdur-Rahman b. Harith and then said: Abu Huraira made this addition: No plunderer who plunders a valuable thing that attracts the attention of people is a believer so long as he commits this act.