Mothballs contain chemicals to keep pests away and, as such, they can also deter mice. Nonetheless, they will likely not remove mice from a household completely.
Mothballs are usually dosed with para-dichlorobenzene or naphthalene, both of which are harmful to animals, including mice. They keep the blood from clotting and are all also harmful to humans if swallowed. However, mothballs usually just cause mice to avoid certain areas. The best way to rid a house of mice is to find the entry points. Homeowners should block all the entry points so that mice cannot get inside and then use traps for the remaining mice.