Beyond the Farthest Star

While exploring on the outer most rim of the galaxy the Enterprise is pulled into the orbit of a dead star. Trapped there, they discover an ancient derelict pod ship also trapped in the orbit. When they investigate they find that the pod ships crew destroyed their own craft, to keep it from being used by an alien entity, which needs a warp drive to escape the dead sun. When it beams aboard the Enterprise, Kirk must find a way to get rid of it, without destroying his ship in the process.