Stardate 3715.0: The Enterprise arrives at Gamma Trianguli VI and a nine-person landing party beams down. The planet is a lush paradise with fertile soil and temperate regions. A security officer, Hendorff, notices a moving flower which sprays poisonous thorns into his chest, killing him. They're unaware that a figure is watching them from the bushes.
They beam Hendorff's body up and Scotty reports there is a fluctuation in the anti-matter pods, possibly caused by the planet's electromagnetic field. Spock picks up an artificial power source in the vicinity of a nearby village, and Spock hears the native who is watching them. Kirk sends two security officers on to approach the village, and Scotty determines that a beam from the surface is dampening the antimatter pods.
Spock examines a nearby rock and discovers that it is made of a highly unstable explosive substance. Kirk and McCoy discuss the situation when Spock spots another flower swiveling toward them. He jumps in front of the thorns and is badly injured, and McCoy needs to get him to the ship. Scotty tries to beam them up but the same dampening field is preventing the transport. Spock recovers due to his Vulcan metabolism and notes that a sophisticated planetary defense system must be at work.
A storm suddenly appears overhead and a lightning bolt disintegrates one of the security guards while the others seek cover. The storm then dies away, leaving Kaplan dead. Security guard Mallory checks in to report he's found the village. The others approach and Mallory runs toward them, but stumbles over a rock and is killed in the resulting explosion. The native approaches and Spock and Chekov stage a diversion while the remaining security guard, Marple, chases the local out. Kirk punches him out and the native, Akuta, breaks into tears. Akuta says he is the Eyes of Vaal, and Vaal is everything. Kirk asks to speak with Vaal and Spock notices that he has a pair of antenna, his Ears for Vaal.
As they proceed to the village, Scotty reports that a giant tractor beam has grabbed them from the surface and without the warp drives, they can't pull free. They're starting to lose ground and can only maintain full power for sixteen hours. Akuta says that Vaal controls the entire world but will speak only to Akuta. Akuta takes them to a cave with a giant lizard-head and glowing eyes. Spock identifies it as atop a power source deep within the planet and of ancient construction. It's also surrounded by a force field that repels Spock. Akuta says that Vaal is sleeping but will awaken, and takes them to the village.
The natives greet them peacefully but there are no children: love and sex is forbidden by Vaal. They're given a hut and Scotty reports their orbit is still decaying. McCoy examines the locals and determines there are no harmful bacteria or decalcification, and they may be thousands of years old.
A gong goes off and the natives start heading to Vaal. The landing party follows and tries to approach, but Vaal rumbles at their approach. Spock concludes Vaal is a machine and the natives are feeding it with the explosive rocks. They conclude it has to constantly renew its energy reserves and they should weaken it around its feeding time. McCoy insists that the locals are stagnant while Spock believes they don't have a right to interfere. Kirk is more concerned about his ship, and Scotty reports that the power on the Enterprise is slowly dropping. He plans to switch over circuits for extra power but it will leave them with very little time to spare by the time he is ready.
That night, Akuta communes with Vaal and then returns to the village. Yeoman Landon and Chekov go for a walk and kiss, as a native couple look on in bemusement. They decide to try it themselves but Akuta interrupts them and says that the outsiders have contaminated them with new ideas. Akuta gathers the villagers and explains a new concept to them, given to him by Vaal: murder.
Through the night, Kirk considers the situation and believes the natives should have the freedom to choose, although Spock disagrees. The landing party emerges from their hut to discover the People of Vaal have disappeared. They approach Vaal and try to make contact, but it gathers another lightning storm and grazes Spock with a bolt of lightning.
Returning to the village, the natives attack and kill the last security guard, Marple, and the remaining landing party members defeat them and imprison them in their huts. With twelve minutes left to spare, Scotty tries to break the Enterprise free but fails.
On the planet, Vaal's feeding gong rings and the Vaalians insists on feeding him. Kirk refuses to let them and orders Scotty to fire upon the lizard head to increase the power drain. Vaal burns itself out and is destroyed, releasing the ship. The natives are upset but Kirk informs them that now they can proceed with their lives and work for themselves, as well as discover loving, caring, and children.
Later back on board, Spock and McCoy are arguing over whether they did the right thing. Spock notes that just as in the Bible, they have despoiled Eden by giving the Vaalians the knowledge of good evil. Kirk wonders if there is anyone on the ship that might be considered Satan, looking at Spock, and the Vulcan admits there isn't.