First of all never put salt on octopus to kill it, because this is the most painful way to go. If you have to kill an octopus, do it in a more humane way - make a quick incision behind the eyes to disconnect the brain from the body. Now coming to the point why does salt kill an octopus when the creature lives its whole life in ocean water?
The reason is the increase of salt concentration which kills even oceanic creatures without mercy. Living in salt water is completely different from being out of water and covered in pure salt. Salt is very nasty stuff in high concentrations - it sucks water right out of anything, which will dehydrate the tissues to the point of inoperation.
Our skin is tough enough to resist it, but aquatic animals and land based mollusks such as slugs and snails have no defense against it. Most animals that live in salt water have developed biological systems that depend on the salt concentration of the environment. Many invertebrates' skin is intentionally porous to allow this water into their bodies to help run all their metabolic and biological needs. This is why most salt water species can't live in fresh water and vice versa.
On the other hand, the skin of an octopus has microscopic wrinkles. This multiplies the surface area of the skin so as to increase its contact with its marine environment. if it was possible to flatten out these microscopic fold, it can easily cover the floor of your bedroom. This huge contact area makes octopus more vulnarable to high concentration of salt.
Almost nothing can live in pure salt. There are only a few extremely tough bacteria called halophiles that can withstand it. Keep in mind that salt has been used for centuries to preserve meat and fish. That's not for the flavor or taste - the salt is so deadly to most organisms that the meat packed in salt simply doesn't rot. Not only the mollusks or octopuses, even microbes can't survive in high concentration of salt.