In the 24th century, Captain Jean Luc Picard awakens from a nightmare in which he relived his assimilation by the cybernetic Borg six years earlier. He is contacted by Admiral Hayes, who informs him of a new Borg threat against Earth. Picard's orders are for his ship, USS Enterprise, to patrol the Neutral Zone in case of Romulan aggression; Starfleet is worried that Picard is too emotionally involved with the Borg to join the fight.
Learning the fleet is losing the battle, the Enterprise crew disobeys orders and heads for Earth, where a single Borg Cube ship holds its own against a group of Starfleet vessels. Enterprise arrives in time to assist the crew of USS Defiant and its captain, the Klingon Worf. With the flagship now supporting them, Picard takes control of the fleet and directs the surviving ships to concentrate their firepower on a seemingly unimportant point on the Borg ship. The Cube is destroyed after launching a smaller sphere ship towards the planet. Enterprise pursues the sphere into a temporal vortex. As the sphere disappears, Enterprise discovers Earth has been altered – it is now populated entirely by Borg. Realizing the Borg have used time travel to change the past, Enterprise follows the sphere through the vortex.
Enterprise arrives hundreds of years in its past on April 4, 2063, the day before humanity's first encounter with alien life after Zefram Cochrane's historic warp drive flight some time after the Earth had been decimated by the nuclear holocaust of World War III; the crew realizes the Borg are trying to prevent first contact. After destroying the Borg sphere, an away team transports down to Cochrane's ship, Phoenix, in Montana. Picard has Cochrane's assistant Lily Sloane sent back to Enterprise for medical attention. The captain returns to the ship and leaves Commander William T. Riker on Earth to make sure Phoenix's flight proceeds as planned.[4] While in the future Cochrane is seen as a hero, the real man built the Phoenix for financial gain and is reluctant to be the person the crew describes.
A group of Borg invade Enterprise's lower decks and begin to assimilate its crew and modify the ship. Picard and a team attempt to reach engineering to disable the Borg with a corrosive gas, but are forced back; the android Data is captured in the melee. A frightened Sloane corners Picard with a weapon, but he gains her trust. The two escape the Borg-infested area of the ship by creating a diversion in the holodeck. Picard, Worf, and the ship's navigator, Lieutenant Hawk, travel outside the ship in space suits to stop the Borg from calling reinforcements by using the deflector dish, but Hawk is assimilated in the process. As the Borg continue to assimilate more decks, Worf suggests destroying the ship, but Picard angrily calls him a coward, infuriating Worf because of his Klingon heritage. Sloane confronts the captain and makes him realize he is acting irrationally because of his own past with becoming Locutus of the Borg. Picard orders an activation of the ship's self-destruct, then orders the crew to head for the escape pods while he stays behind to rescue Data.
As Cochrane, Riker, and engineer Geordi La Forge prepare to activate the warp drive on Phoenix, Picard discovers that the Borg Queen has grafted human skin onto Data, giving him the sensation of touch he has long desired so that she can obtain the android's encryption codes to the Enterprise computer.
Although Picard offers himself to the Borg in exchange for Data's freedom and willingly become Locutus again, Data refuses to leave. He deactivates the self-destruct and fires torpedoes at Phoenix. At the last moment the torpedoes miss, and the Queen realizes Data betrayed her. The android ruptures a coolant tank, and the corrosive vapor eats away the biological components of the Borg. With the Borg threat neutralized, Cochrane completes his warp flight. The next day the crew watches from a distance as an alien Vulcan ship, attracted by the Phoenix warp test, lands on Earth. Cochrane and Sloane greet the aliens. Having ensured the correction of the timeline, the Enterprise crew slip away and return to the 24th century.
Patrick Stewart as Jean-Luc Picard
Jonathan Frakes as William Riker
Brent Spiner as Data, an android and the ship's second officer
LeVar Burton as Geordi La Forge
Michael Dorn as Worf
Gates McFadden as Beverly Crusher
Marina Sirtis as Deanna Troi
Alfre Woodard as Lily Sloane
James Cromwell as Zefram Cochrane
Alice Krige as the Borg Queen,
Several of The Next Generation's recurring characters also appeared in the film; Dwight Schultz reprised his role of Lieutenant Reginald Barclay and Patti Yasutake briefly appeared as Nurse Alyssa Ogawa.
Michael Horton appears as a bloodied and stoic Starfleet Security Officer; his character would be given the name Lt. Daniels in the next Star Trek film.
Neal McDonough plays Lt. Hawk
Robert Picardo appears as the Enterprise's Emergency Medical Hologram
Ethan Phillips, played Neelix (uncredited)