Yes, salt will kill a slug.
This is because salt uses the osmosis that slugs depend on to dehydrate them and suck the water out of their body. Slugs gather water around them to hydrate themselves, and if the water is removed, the slug cannot survive.
A slug secretes slime that allows it to eat, move, and function. A slug’s slime is mainly water, but also contains a small amount of salt. The amount of water in the slime is perfect for the slug to keep it hydrated and functioning properly. The slug keeps drawing in water with a process called osmosis, something many animals use, but mostly smaller cells.
When the slug draws in water that contains salt, the slug has no way of knowing the salt is present, and sucks it in just like any other water. The slug can also glide over the salt and pick it up that way. As soon as salt makes contact with a slug’s body, it will start to dehydrate it and force the water out of the slug. The slug now no longer has the means to create the slime it needs to function. The salt will take the place of the water, leaving the slug completely dried out.