Stardate 1531.1: The Enterprise arrives at M-113 for a routine medical inspection of the Craters, Robert and Nancy, who are exploring the ancient ruins. Kirk, McCoy, and Crewman Darnell beam down and Kirk gives McCoy a hard time about the fact that he and Nancy Crater were an item ten years ago. Nancy arrives and each of the three men seems to see her differently: McCoy as she was ten years ago, Kirk as she should look age-wise, and Darnell as a totally different attractive younger woman. Kirk sends the goggling Darnell outside and when Nancy goes out, she beckons Darnell to follow her.
Professor Crater arrives and doesn't appear happy to see them, telling them that he and his wife don't need a medical examination. On the other hand, he seems glad to see McCoy as an old friend of his wife's, then insists on making sure they restock their salt tablets for the hotter planet. Kirk orders Crater to submit to the medical exam but before McCoy can proceed they hear a scream from outside. They go out to find Darnell, dead, with red ring-like mottling on his face. There's a plant root in his mouth and Nancy comes up, saying she saw Darnell taste the plant and she couldn't stop him. Kirk is skeptical that an experienced crewman would taste an unknown plant. Kirk has Darnell's body beamed up to the ship, while Nancy reminds them to provide them with more salt tablets.
Spock analyzes the plant, a Borgia root, and confirms that records show it's poisonous but it has no record of leaving mottling. McCoy conducts the initial exam but can't find any cause of death, poisoning or otherwise. Kirk and McCoy compare notes on Nancy and McCoy admits he might have been seeing her the way he imagined her from ten years ago.
Kirk decides to remain to investigate Darnell's death, and McCoy finally determines that Darnell had every bit of salt drained from his body. Kirk beams back down to the planet with McCoy and two crewmen, Green and Sturgeon. They spread out but Crater slips away and calls out to Nancy saying he has salt. Kirk and McCoy find Sturgeon's body, unaware that Nancy is nearby over Green's corpse. Both he bodies have the same red rings on the faces. She pauses and then changes her shape, turning into a duplicate of Green. He meets with Kirk and McCoy and they beam back up to the ship to conduct a search from orbit.
Green roams the halls and runs into Rand, who is taking a food tray to Sulu in Botany. "Green" is attracted to the salt and follows her in, but the plants react badly to him. He leaves and runs into Uhura, taking the form of a crewman from her memories. He almost succeeds in hypnotizing her but Rand and Sulu arrive and Uhura is summoned to the bridge.
McCoy is trying to get some sleep and Kirk ends up proscribing a sedative for him. Spock confirms that the scans only show Crater on the planet, and he and Kirk beam down to capture the professor. "Nancy" assumes her female form and goes to McCoy's quarters, and seems reassured by the fact he has strong memories of her that she can rely on. Nearby, Sulu and Rand find a dead crewman with the same red mottling.
McCoy is already asleep when the general alert sounds, and "Nancy" takes on his form and goes to the bridge. On M-113, Kirk and Spock find Green's body and realize an imposter is on-board. They find Crater, who tries to frighten them off with phaser fire. They flank and then stun him, and the dazed Crater says that his real wife died a year ago, killed by the creature. It's the last of its kind and he helped to keep it alive, as it needs salt to survive.
Kirk takes Crater to the ship and calls a meeting, unaware that McCoy isn't McCoy. "McCoy" suggests they try to deal with the creature peacefully and Crater clearly recognizes it for what it is. Kirk prefers to eliminate the creature and insists that Crater help identify it. He refuses and Kirk orders McCoy to administer truth serum. They go to sickbay and a suspicious Spock insists on going with them. The alert goes off and Kirk arrives in sickbay to find an injured Spock. Crater is dead, killed by the increasingly desperate creature. Fortunately, Spock's blood made him immune to the creature's hunger.
Back in her "Nancy" form, the creature goes to McCoy's quarters and asks him for help. Kirk arrives with a phaser and a handful of salt and tries to entice the creature into attacking. McCoy refuses to believe Nancy is false and gets in the way so the creature can attack Kirk. It hypnotizes him and stars to feed off of him while McCoy holds the phaser, indecisive. Spock arrives and tries to use his superior strength against the creature, but it's stronger still. McCoy realizes the creature isn't his "Nancy" and shoots it. The creature reverts to its true alien appearance and McCoy guns it down, saving Kirk. The matter settled, they leave orbit as Kirk considers the creature… and the extinction of the buffalo on Earth.