Stardate 5832.3: The Enterprise is pursuing a stolen space cruiser, the Aurora, which refuses to respond to their hails. It breaks off and heads for Romulan space, and its engines start to overheat when the Enterprise applies a tractor beam. Scotty prepares to transport and locks on just as the ship blows up. Scotty brings the six passengers aboard: they are exotically dressed "hippies."
One of them, Tongo Rad, is the son of a Catullan ambassador and Kirk has been ordered to handle him and his friends with delicacy because of ongoing negotiations with the Catullans. Kirk orders them to the briefing room but the newcomers protest, as Chekov recognizes one of the women's voices. Kirk goes to the transporter room but they refuse to answer his questions. Spock manages to get through to them by giving them the sign of the One. Their leader, Dr. Sevrin, eventually admits that they are trying to find the planet Eden and recognize no authority but themselves. Kirk is obliged to offer them the hospitality of the ship but refuses to take them to Eden.
Back on the bridge, Chekov says that he knows the woman, Irina, who was in Starfleet Academy with him but dropped out. Kirk lets Chekov go see her as they're taken to Sickbay for medical examinations. Spock notes Dr. Sevrin is a brilliant scientist from Tiburon who is seeking an escape from the impositions of the technological society. Spock admits that he's curious, if not sympathetic toward them.
Chekov goes to Sickbay and talks with Irina, and is dismayed with what she's done with her life. They were romantically involved at Starfleet and she left without warning. They're unable to reconcile their differences and he tells her to go back to her new friends.
Kirk reports to Sickbay where McCoy reveals that Sevrin is the carrier of a disease that can only be controlled in a technological environment. Kirk has Sevrin put in isolation until McCoy can determine if the crew is infected. Outside, Sevrin's followers are trying to convince Sulu to join them and Kirk promises that Sevrin will be freed once it's safe. One of the men, Adam, responds by singing.
Kirk asks Spock to try to get through to Sevrin and the Vulcan visits the doctor in the brig. Spock offers to do the research to locate Eden and seek permission for them to colonize it, but Sevrin refuses. He admits that he knew about the disease but that technology is like a poison to him. Sevrin insists that only primitives can cleanse him and he has to go to them, against Spock's advice. However, Sevrin finally agrees to try and calm his followers, and has Spock bring them in.
Spock reports back to Spock with his opinion that Sevrin is insane, but abides by his promise to help Sevrin and his followers find Eden, with Chekov's assistance. As Spock conducts the research, Adam comes to visit him and sees the Vulcan's lyre, then asks if they can have a session. Spock agrees to arrange it.
Irina comes to see Chekov in Auxiliary Control and apologizes for their earlier fight, and they end up kissing until Spock calls to find out why Chekov has stopped his research. Sevrin's followers meet and discuss that they've been befriending the crew… and have learned what they need to takeover the ship.
Adam and the others perform in the mess hall, and then Adam performs with one of the women. Tongo Rad frees Sevrin, knock out the guards, and take over the ship from Auxiliary Control. He insists he will destroy the ship if Kirk tries to interfere before they get to Eden, and then takes the ship into Romulan space. Spock tries to get through to Adam and the others without success, while Tongo Rad determines they're three hours away from Eden. Sevrin adjusts the circuits to emit ultrasonic waves while Kirk and Spock head to Auxiliary Control. Irina wonders if the sound waves are lethal but Sevrin assures her his own knowledge is sufficient to keep them at stunning level. Scotty starts to burn through the bulkhead and Sevrin triggers the sound emitter. First Spock and then the others drop unconscious and Sevrin takes his followers down to Eden by shuttlecraft.
Kirk and the others recover unconsciousness and destroy the ultrasonics: Spock reveals that they were on a time delay to emit lethal levels once Sevrin and his people had left. Kirk, Spock, McCoy, and Chekov beam down to the planet and find a beautiful landscape. They spread out to approach the shuttlecraft but Chekov touches a flower and suffers burns: the plants have acid for sap. Spock finds Adam: dead after having eaten an apple-like plant from a tree.
They spot the shuttlecraft and approach it, and find Sevrin and the others suffering from acid burns on their bare feet and legs. Sevrin refuses to leave, climbs up into a tree, and eats a fruit… and dies. Later, the four remaining individuals prepare to leave and Irina and Chekov kiss as Spock assures her that one day they'll find the Eden they seek.