According to Slug Off, when salt is poured onto a slug, it dies of dehydration. A slugs depends on water for its survival, and salt draws the water out of the slug. This is possible due to a process known as osmosis --when water passes from a region of high water concentration to a region of lower water concentration.
Salt is a desiccant, meaning it absorbs water. This is the reason why a person becomes thirsty when they eat large amounts of salt, explains Slug Off. The skin of a slug is much more permeable than the skin of other animals. For this reason, when salt is applied to the moist surface of the slug, the salt sucks the water from the slug's skin.
The loss of water triggers the process of osmosis. The slug then begins to produce large amounts of fluid that rushes to the skin's surface in an attempt to create equilibrium and dilute the concentration of salt. According to Slug Off, the production of this fluid is the "thick goo" that can be seen after the salt has been applied to a slug. The slug rapidly looses more fluid than it can tolerate, and as a result, dies of dehydration, explains Slug Off.