The U.S.S. Enterprise arrives at planet M-113 to deliver supplies to Dr. Robert Crater and his wife, Nancy, whom Doctor Leonard McCoy was once romantically involved with. The Craters have been on M-113 for five years conducting an archeological survey of the planet's ruins. They are the only known inhabitants of the planet.
Crater tells Kirk that the only thing they need are salt tablets. Otherwise, they want to be left alone. Kirk debates this, insisting they must need other supplies and must at least allow McCoy to give them physicals. While this is happening, Darnell, one of Kirk's landing party, meets a beautiful young woman and wanders off with her.
When Kirk goes looking for the young man, he finds him dead, his body scarred with suction cup-shaped marks. The Captain orders the Craters to beam aboard the U.S.S. Enterprise. On ship, Dr. McCoy is amazed at how little Nancy has changed since he last saw her, several years earlier. Her close proximity on board the starship begins to reawaken old feelings for the doctor that somewhat shadow any suspicions of her that he might normally have had.
However, the woman McCoy sees as Nancy Crater is a shape-shifting creature, the last survivor of M-113, and can literally appear as a different being to each person 'she' meets. By reaching into their minds and drawing on their memories, the creature can lull her potential victims into a false sense of security before she kills them.
The problem facing the M-113 creature is the need for sodium chloride ... salt. Without it, the being will die and its home planet is running out. The rest of its race died due to this shortage, and this final survivor formed a symbiotic relationship with Professor Crater. Crater provided the M-113 creature with the needed salt and the creature in turn gave the professor companionship ... something he had craved since the salt creature murdered his wife, the real Nancy Crater, for her body's salt.
Let loose on board the U.S.S. Enterprise, the M-113 creature begins killing members of the crew, first luring them by posing as someone they know and trust, then draining their bodies of their precious salt. Finally, the creature kills Crater and changes into Nancy Crater, nearly killing McCoy. Kirk and Spock, who have figured out the creature's secret, rush to the doctor's quarters and convince him that this is not the real Nancy. In an emotionally painful move, McCoy kills the creature, saving himself and the U.S.S. Enterprise crew.