Mothballs emit a toxic vapor that kills all types of insects, including spiders. However, mothballs should never be used to control spiders because mothball vapor is toxic to people and animals.
Mothballs are an insecticide containing either naphthalene or paradichlorobenzene. They are meant to be placed in clothing containers that trap the fumes, killing moths that will harm clothing. Mothballs should never be used where people, pets or wildlife will be exposed to the mothballs or the vapors. When the vapor is inhaled, insecticide is drawn into the lungs. If a mothball is ingested call the poison control center immediately. If eaten by a pet, call a veterinarian.