Tobacco was unknown in the time of the Prophet ﷺ, so there is no text that names it, and the earliest scholars to discuss it disagreed. As the harm became clear, the position moved. The Quran tells believers not to cast themselves into ruin with their own hands and not to kill themselves, says that the Prophet ﷺ makes lawful the good things and forbids the foul, and calls squanderers the brothers of the devils. The World Health Organization says that tobacco kills more than 8 million people each year, so most scholars today consider smoking one of the clearest cases of harm, which makes it forbidden.
The Prophet ﷺ approved when his companion Salman told another companion that his Lord has a right over him, his self has a right over him and his family has a right over him, and that he should give each its due. Scholars also compare the smoke to a hadith in Muslim in which the Prophet ﷺ told anyone who had eaten from the foul-smelling onion and leek not to come near the mosque, because the angels are troubled by what troubles people. Those who smoke around others, especially children, harm them without their consent.
Some scholars still describe smoking as strongly disliked and not forbidden, and Muslims who smoke are not outside Islam. Quitting is hard, as nicotine is addictive, but many Muslims use Ramadan as a starting point, and doctors and quit programmes are encouraged, since seeking treatment for harm is part of Islamic teaching. Allah does not burden a soul beyond its capacity, and each sincere attempt is rewarded, even if it takes a number of tries.