Although Sulu orders an increase of speed to warp five, the Enterprise loses the cruiser when it enters Tortuga's space boundaries. The cruiser lands on the planet, a haven for pirates; its crew, who declare their intention to trade stolen Jovian fire jewels, are Kirk, Spock, McCoy and Scotty disguised as pirates.

In flashback, McCoy recalls Kirk receiving a message from Starfleet Command 48 hours earlier informing him that dilithium supplies had become dangerously low. Starfleet had found half of a map showing the location of a stolen dilithium shipment; the other half was believed to be held by Black Jack Nova, a pirate captain in hiding on Tortuga, outside the Federation's jurisdiction. Starfleet authorized Kirk to take any action necessary to recover the dilithium.

Kirk's party overhear someone speaking of Nova inside a tavern where the pirate captain is drinking. Scotty starts a fistfight by claiming his own captain is a better man than Nova; Kirk, Spock and McCoy join in and defeat Nova's crew, leaving only Nova himself standing. Kirk shows Nova his half of the map, and they agree on a partnership to find the dilithium – but Nova is already planning to kill Kirk and the others.

Nova and Kirk's group travel in a shuttlecraft to Nova's ship, the Windjammer. Nova's first mate, Kreel, shows them their bunks. Later, Kreel overhears Spock warning Scotty not to be too hostile to Kreel and mentioning that they are Federation agents. Kirk sees Kreel listening to Spock and Scotty and realizes what he must do. On the bridge, Kirk tells Nova that Spock and Scotty are Federation spies. Scotty protests Kirk's betrayal, but Kirk says they betrayed him by claiming to be thieves. Nova sentences Spock and Scotty to walk the plank.

In the airlock chamber, Nova tells the two men to don transplastic spacesuits. Spock asks why he is giving them suits, since they would die in seconds without them; Nova replies that he wants them to die slowly as their oxygen runs out. McCoy urges Kirk to save Spock and Scotty, but Kirk tells him they cannot sacrifice the Federation for their two friends' lives. Spock and Scotty are sent through the airlock and float off into space...

Captain's Log, Star Date: 3246.8 – Under Federation orders to recover a stolen shipment of valuable dilithium crystals, Officers Spock, McCoy, Scott and myself have made contact with the infamous space pirate, Black Jack Nova! When the success of our mission was threatened by discovery, I was forced to sacrifice Officers Spock and Scott to divert attention away from myself! Now as I watch my two best friends vanish into the void – I pray their sacrifice will not be in vain!

As Nova's ship sails away, leaving Spock and Scotty behind, they are beamed aboard the Enterprise, which has been following the Windjammer using the Romulancloaking device. Back on the Enterprise bridge, Spock orders a course for Taos IV, where the dilithium is located. Sometime later, Enterprise reaches the planet. Spock leads a landing party down to the surface, ordering Sulu to take the ship away from the planet so as not to alarm Nova. Spock plans to let Nova find the dilithium and then confiscate it. However, Spock's party is accosted by Ben Cannon, an old man toting a rifle, who has been spacewrecked on Taos IV for almost a year. Nova's shuttlecraft lands, and Spock, Scotty, Cannon and the others head for it.

Debarking from the shuttle, Nova and Kirk put their halves of the map together. The pirates dig at the spot the map indicates, but find nothing. Nova accuses Kirk of finding the treasure first and pulls a gun on him. Spock shoots the gun out of his hand and Nova runs away. Kirk follows, ordering Spock to contact the Enterprise and have the Windjammer captured. As Kirk searches the jungle for Nova, the pirate drops on him out of a tree. The two men fence, and Nova makes it to the shuttlecraft. As he closes the cockpit canopy, Kirk throws his sword at him but misses. The shuttle takes off, but Kirk's sword has struck one of its generator tubes, and it crashes and explodes. Meanwhile, Spock has used his tri-corder to discover that the dilithium has been dug up and stored in a cave by Cannon, the Windjammer's former captain. He was betrayed by his crew, who took the map and left him to die. McCoy receives word that the Enterprise has captured the Windjammer. Back on the starship, McCoy expresses surprise that piracy still exists in the 23rd century; Spock attributes this to humanity's "violent tendencies."

Due to artists unfamiliar with the Star Trek series, this issue features Scotty wearing a command division green-gold Starfleet uniform, rather than his proper engineering division red uniform, although in his case the uniform is explainable – as second officer, he can properly wear command colors as an alternative to his regular operations division uniforms. (Scotty makes switches between command and operations uniforms in his last few movie appearances.) However, the other members of Spock's landing party also wear green-gold uniforms, even though they are presumably Security personnel who should wear red uniforms.

McCoy is not actually present for the events of his own flashback.

Kirk tells Nova his real name.

Perhaps influenced by the nautical ambience of Nova's ship, Spock refers to "the vacuum of deep sea".

Surprisingly, Kirk refers to Spock and Scotty (not McCoy) as "my two best friends" in his log entry.