A huge alien probe approaches Earth and begins sending strange highly amplified signals which boil the oceans, drain the power from nearby ships and cause widespread mayhem. Admiral James T. Kirk and his crew return from their mission to revive Captain Spock on Vulcan, despite knowing that they will face court-martial for the theft and subsequent loss of the USS Enterprise, when they hear about the current crisis. Spock, who is still recovering mentally, discovers that the alien ship is trying to contact humpback whales, which unfortunately were hunted to extinction three centuries previously.
Kirk orders their hijacked Klingon Bird-of-Prey, renamed the Bounty, to slingshot around the sun in order to travel back in time to the late 20th century. Arriving in San Francisco, California in the year 1986, the crew hides their cloaked ship in Golden Gate Park. Thereafter, they attempt to find both the whales needed to communicate with the alien probe, as well as materials to contain the whales and to restore the Bird-of-Prey's power source, which was nearly drained in travel. Kirk and Spock eventually recruit the assistance of Dr. Gillian Taylor, a cetacean specialist, who is caring for two humpback whales in the cetacean institute in Sausalito.