Stardate 1512.2: The Enterprise is heading into uncharted space when they sense an item approaching them at light speed on a collision course. As they approach, they determine it's a cubical object rotating in space and blocking all attempts to move around it. Kirk is in sickbay receiving his quarterly physical checkup and McCoy avoids pointing out the ship is at red alert. Kirk finally notices once the physical is over and contacts the bridge for a status report, then goes to the bridge. The object proves resistant to their scanners and has no apparent power source. Mr. Bailey, the navigator, suggests they blast it but Kirk quickly shuts him down.
In the briefing Spock suggests the object is some kind of buoy and Kirk determines it's time for action. Bailey jumps the gun and orders a phaser crew, and Kirk quickly overrides him and tells him to plot a course away from it. The buoy follows them, emitting increasing levels of radiation. Finally they have no choice but to destroy it with phasers.
Kirk decides to continue on and McCoy advises him against putting too much pressure on Bailey. The two go to Kirks' quarters and spar over the captain's new diet when they sense a new object on scanners. On the bridge, Kirk determines a massive object is approaching them. It turns out to be a space ship many times their size and at least a mile in diameter, which immediately grabs them in a tractor beam. The ship captain identifies himself as Captain Balok of the Fesarius and considers them hostile due to the destruction of the buoy. Balok shorts out their board when they try to respond and scans their computer banks. They try to launch a recorder marker and a shocked Bailey takes several seconds to respond. When they do launch it, Balok destroys it and informs them that their ship must be destroyed and gives them ten minutes to make piece with their deities. Kirk tries to respond again but Balok ignores them. Kirk orders Bailey to lay in a course but he's still in shock, and they discover that the ship's controls are locked. Spock manages to get a visual signal and brings up a picture of Balok's foreboding alien appearance.
Bailey starts to panic until Kirk relieves him and has McCoy escort him to his quarters. They then try to get through to Balok again but he refuses to listen and informs them they have seven minutes left. The time counts down to four minutes as Kirk considers what alternatives they have, and even Spock acknowledges they may have no options. McCoy blames Kirk for pushing Bailey too hard and Kirk snaps back at him for trying to bluff him. With three minutes left, Kirk concedes the argument then comes up with a plan. He contacts Balok and informs him the Enterprise is equipped with corbomite, a substance that will destroy any attacking ship. There is no response and Bailey requests permission to come back to the bridge.
When the countdown expires, nothing immediately happens. Balok then contacts them, demanding proof of their corbomite device. Kirk refuses and Balok cuts off the visual signal. A smaller ship breaks off from the Fesarius and Balok informs them that it will take them to a planet where they will be imprisoned and their ship destroyed. Kirk plans to try to break out of the tractor beam with the warp engines. After a few minutes of tense maneuvering they manage to break away, damaging the pilot vessel in the process. They pick up a distress signal from Balok saying the ship is damaged, but the transmission isn't strong enough to reach the mother ship. Kirk takes McCoy and Bailey with him to provide Balok with assistance.
They beam over into the confined quarters of the pilot vessel and find themselves face-to-face with "Balok": a dummy. The real Balok, a childlike alien, invites them into his quarters and offers them drinks. They reluctantly accept and Balok explains that he used the dummy to set up a false pretense so he could test their real intentions. He suggests they leave a crewman with them and Kirk offers Bailey, who eagerly volunteers. Balok offers to give them a tour of his ship.