While exploring the Delta Triangle, a mysterious region of space where large numbers of starships have disappeared over the past couple of centuries, the Enterprise encounters a Klingon warship, the I.K.S. Klothos. Captain Kor, the warship's commander, opens fire on the Enterprise only moments before the Klothos vanishes into the Delta Triangle. When two more Klingon vessels appear, their captains accusing Kirk of causing the disappearance of the Klothos, Kirk has no choice other than to take refuge in the very same region of space, which apparently swallowed up the Klothos.

Once the Enterprise is safely ensconced inside the Delta Triangle, Kirk and his crew discover that the starship has entered an alternate universe containing vast graveyard of space vessels from virtually every known galactic civilization; some of these vessels are so old that Chief Engineer Scott has seen them before only as drawings in technology museums. Although the Enterprise's sensors initially fail to find any sign of the Klothos, they discover a group of people living aboard the derelicts — descendants of some of the doomed ships' original crews.

The Klothos suddenly reappears and opens fire on the Enterprise, only to have its weaponry neutralized before it can do any damage. Within moments, a transporter beam whisks the commanders of both ships before a tribunal of people who identify themselves as the Elysian Council. These people belong to a diverse array of species, including Andorians, humans, Gorn, Klingons, Kzinti, Orions, Romulans, Tellarites, and Vulcans. The group's leader, Xerius, explains to Kirk and Kor that their ships will be trapped forever in the extradimensional region of space they call Elysia, where time passes very slowly and no violent actions are allowed to occur. All of the Elysians have tried to escape Elysia at some time or other, but none have succeeded.

After being sent back to the Enterprise, Kirk learns that the warped nature of local space-time is destroying the starship's dilithium crystals, making a quick escape an absolute imperative, impossible or not; meanwhile, Kor and his crew make the same discovery aboard the Klothos. With time rapidly running out before both vessels become inoperable, Kirk and Kor work in tandem on an escape plan, linking their ships together so that the combined power of their engines will drag them both back into normal space. While the two captains exchange personnel to facilitate this plan, Kor quietly plots to use an explosive to destroy the Enterprise after both vessels escape the Delta Triangle. Surreptitiously touching some of the Klingon crew, Spock uses his touch-telepathic abilities to discover that Kor is plotting against the Enterprise crew, and an Elysian named Magen telepathically provides Kirk and his crew with the details, thereby preventing a bomb planted aboard the Enterprise by a Klingon woman named Kali from causing any damage. Although he managed to destroy neither his old adversary Kirk nor his starship, Kor takes the Klothos home in triumph, taking full credit for the escape plan that saved both vessels.