The movie opens with three Borg transporting to the surface of a planet where one finds an underground chamber with strange cocoons hanging from the roof. When he tries to assimilate one by injecting it with Borg nanoprobes he becomes infected with a viral exomorph and turns into a hybrid Borg/Exomorph spider, The Archeopendra. Leaving the chamber he and his companions are transported back to their ship, the Borg cube where the infection spreads to take control. The infection forces a break with the collective. In order to prevent re-assimilation and to find a safe haven to propagate, the infected cube leaves Borg space.
The Alpha quadrant has been preparing for the return of the Borg, primarily by investing massive R&D in offensive and defensive weaponry. During the long peace, the Federation/Klingon alliance has been wearing thin, with the younger factions seeking a return to the old ways.
Meanwhile, the Federation, taking advantage of a detent with the Romulans, have cautiously begun to work to with them on holocloak technology -- a combination of a holodeck and a cloaking device. Technically, this is a violation of the treaty of Algeron, which forbids the Federation the use of cloaking technology. While the treaty is technically between the Federation and the Romulans, the Federation's willingness to forego cloaking is a lynchpin of the Federation/Klingon alliance.
The consensus at Starfleet is that the free races of the Alpha quadrant must work together if the next Borg invasion is to be successfully repelled. However, because the Klingons, due their racial hatred of the Romulans, are unlikely to agree with this strategy, Starfleet is keeping the holocloak research under wraps. Because of his broad understanding of both the Borg and Alpha Quadrant interracial politics, Captain Picard has been given full authority over the entire project.
By chance, the Borg stumble onto a Klingon mining freighter that belongs to the House of Mi'qoch, the Klingon clan that's responsible for the Klingon Empire's anti-Borg program. A Klingon ship is attacked by a Borg Cube, the captain sends out a distress call but there is no time. Rather than be captured he starts a self-destruct sequence and crashes into the cube. The Cube focuses a beam on the asteroid they were close to.
On the Rac'tah, a massive Klingon starbase/shipyard facility located close to Borg space, Captain Jureth Mi'Qoch a powerful young Klingon in Federation battledress arrives. The eldest son of the House of Mi'qoch, he has not yet learned of the growing cooperation between the Federation and the Romulans even though he is the liaison between the Klingon Empire and the Federation on anti-Borg projects. Once on board the starbase, he meets his father, General Mi'Qoch and they discuss a new weapon the base has, an Ion cannon and watch a demonstration of it's power as an asteroid is pulled by tractor beam towards the base and then destroyed. Just as the test finishes they have the distress call from the Klingon freighter relayed to them. Jureth's younger brother, Kephren Mi'Qoch is ordered to take a powerful new warship, The Noc'jedg, to find and eliminate what they believe to be piracy.
Later, on board the warship, Kephren talks on the viewscreen with his older brother, he gets his orders and the ship jumps to warp. Kephren is of one of the young rebels who despise both the Federation and his Federation-tainted brother. They arrive at the freighter's last known position and discover the Borg Cube that is "assimilating" the asteroid below. The Cube turns to fight, but is destroyed by the klingons. They get a message from Jureth congratulating them on their success when they are hit by devastating weapons fire from the asteroid itself. Borg drones appear on the bridge and start tampering with the ships systems, Kephren kills some but eventually he is struck down by a forcefield. Whilst he is down, the Borg blow up the Klingon warship.
Back on the asteroid, the Borg go back to what they were doing - assimilating the whole asteroid, turning it into a gigantic Borg sphere spacecraft! After the process is complete, the sphere sets course for the Alpha quadrant - home of the United federation of Planets and ... Earth!
Jureth returns to Unity Starbase and storms through the base straight to the Ready room, where he meets Jean Luc Picard who he asks for help in the fight against the Borg. Picard has already gone over the reports in advance and sends a message to Captain Tuvok to go to the region and investigate.
On board the bridge of his ship, the Dallas, a Defiant-class starship specially adapted for combat against the Borg, Tuvok gets under way after getting a situation report from his Romulan aide, Arai. When they arrive, they find only the crippled the Noc'jedg, which was not totally destroyed, with it's captain Kephren Mi'Qoch still alive so they beam him out and give him emergency medical assistance.
Meanwhile, the Borg assimilated asteroid has closed on the Klingon outpost of General Mi'Qoch. The Borg charge up their weapons and attack the outpost but the Klingon's return fire with the Ion cannon, which causes massive damage, crippling the Borg asteroid.
The Borg launch drone shuttlepods which attack the outpost from close range, too close for the outpost's defenses to respond. The control room takes a direct hit, which kills all but the General. With the control room secured, so they believe, the Borg beam three drones to assimilate the Ion cannon technology. Two of the Borg erect a force field around the ion cannon's control panel, which the third commences to infect with nanoprobes.
When a security detachment arrives, the general opens a secret compartment and takes out a large gattling gun type weapon and moves out into the corridor opposite the Borg. Blasting a door open, he kills the two Borg who have been supporting the force field. When the shield comes down, the third is dispatched by the security team.
The Borg realize that they must get the Ion weapon technology and beam in a giant super-drone which is strong enough to absorb the phaser fire from the security team assigned now to guard the cannon control panel. The giant Borg drone kills all the team, and advances on the ion canon, which he too attempts to infect with nanoprobes. Whilst he is doing this, the General shoots him with his 'Gattling Phaser' but with no effect. He has no choice, but to ensure the ion cannon doesn't fall into Borg hands, he fires on the console himself, destroying it and in so doing kills the giant drone.
The general boards a shuttle and abandons the outpost as the Borg assimilate it. Just as the assimilation is completed, his read outs flash that his shuttle is out of fuel!
The scene cuts back to the Borg asteroid that is approaching the planet that the Rac'tah was in orbit about. A drone is sent down to the planet to investigate the dominant species, a harmless species that is dwarfed by the Borg drone. Deeming them unimportant, the Borg fire on the planet, wiping out the species. They are absolutely ruthless and without mercy.
The Dallas arrives where the Klingon outpost should be, only to find debris and a Klingon shuttle adrift in space. They use a tractor beam to pull the shuttle in and find the general still alive. They send a probe down to the planet and get a strange sensor reading that they trace to its source. As they are doing so, the Borg Asteroid comes around the planet from the other side and surprises them.
Before they can retreat to report what they have found as ordered, Drone shuttles attack them. Their warp core is damaged and with weapons down they are forced to use their cloaking device even though Kephren, a Klingon, is on the bridge. When he hears of the cloaking device he is outraged and gets into a fight with Arai which is brought to a stop only when bridge crew shoot him at stun setting. When he comes to he is thrown into the brig.
The cloak fools the Borg long enough for the engine repairs to be effected and as soon as they are done, they decloak and go to warp, heading towards Unity Starbase. The Borg asteroid follows them immediately.
Back at Unity, Picard is showing some guests around the control room when the call comes in from the Dallas telling them that they are on their way with the Borg on their tail! He immediately puts the station on alert and transports to the USS Enterprise, which is docked at the starbase.
As the Dallas gets closer to Unity, their weapons come back on line. When the two ships drop out of warp next to Unity Station, the Borg asteroid call (as is their want) on all parties to surrender. Picard tricks the Borg into dropping their shields, so that all available units, including the Dallas, can direct fire onto her. The Borg take heavy damage but their systems are able to adapt and they respond with devastating effect on the Dallas, the Enterprise and Unity Station.
Just as the Borg start to assimilate the space station a Romulan warship decloaks directly ahead of the Enterprise and in response to an order from Picard, turns and fires on the Borg asteroid, destroying it. Picard senses though that the encounter is far from over!
Back on the Borg infested planet below what used to be the Rac'tah, the Klingon starbase, the remaining Borg report the destruction of the Borg asteroid to the Archeopendra which rises like a demon from a pool of what looks like molten lava. "Existence as you know it is over" it says cryptically before it dives back into the pool, causing the remaining drones to retreat in confusion repeating "Error. Error"
Back on board Unity Station, Jureth and his father, the General, meet the youngest son, Kephren, as he comes on board from the Dallas. At first it seems civil enough until Jureth strikes his brother a backhanded blow berating him for loosing his command. The General does intervene, instead saying that he is retiring as the head of house Mi'Qoch and names Jureth his successor. In a display of Klingon power play, Jureth simply says to the General "You could have done better, too!"
They walk back through the station, Jureth cautioning his brother that he must not cause a diplomatic incident, however no sooner are they seated in conference room with the captain from the Romulan vessel that saved them, than he starts trading insults with them!
Picard enters the room, seemingly oblivious to the tension and tells the assembled captains that reinforcements are on their way before handing over to Tuvok and Kleeya to talk about new information. Kleeya is the eighteen-year-old daughter of a Borg escapee who is already famous for her groundbreaking research in man-machine relationships and as part of her post-doctoral work she's assisting Star Fleet to on its anti-Borg strategy. She explains how the Borg have been infected by the Archeopendra, thus making them aggressive and unpredictable.
Tuvok gives them information about the sensor survey of Kitomer 4 - the planet which has been infected - and how they have found that the Borg have a doomsday device, Picard authorizes a covert operation to destroy it. Jureth is skeptical that the Federation can succeed where Klingons have failed. Arai, the Romulan seconded to the Dallas, tells the Klingons about a new form of cloaking devise they have developed jointly with the Federation that disguises the ship so that it can look like another. The Klingon delegation explodes over this; Jureth calls Picard a gullible fool to trust the Romulans and quits the room with his father and brother.
Marching into a bar in the crew lounge of the station, Jureth gets them a table by throwing its occupants out of the bar! Once he believes they are free from listening devises in the noisy bar, Jureth makes it plain that he believes the Romulans to be more of a threat to the Klingon Empire than the Borg and decides that they must steal the prototype "holocloak" vessel.
Unbeknownst to him the bartender has been recording their conversation via a hidden microphone and transmitted it to Arai who gloats that the end of the Klingon / Federation alliance is at hand. Armed with this information, the Romulan warship leaves Unity Starbase.
The scene cuts to the lair of the Archeopendra, where a Borg drone has been called. The Archeopendra rises from it's lava pool and announces that the drone, and by extension all the drones, are flawed and his "progeny" will take over from them. A smaller, spider-like drone comes out of the pool, strikes down and kills the Borg drone. The scene closes as dozens more spider-drones leave the pool and spread out, presumably to hunt down the rest of the more normal Borg.
Back at Unity, the new holocloak has been installed in the Dallas and she leaves her docking bay. Picard gives a short speech explaining that although the Klingons don't agree with the work, it is necessary to win the war against the Borg. After jumping to warp we see that the three Klingons are hidden in the general's shuttle in the shuttle bay of the Dallas from where Jureth leads them on an attack on the bridge. However before they can stop her, the helmsman gets off a Mayday that is picked up by Enterprise, which sets off in pursuit.
On the bridge of the Dallas Jureth cannot get the crew to cooperate and whilst they are arguing, Arai, the Romulan operative switches on a personal cloaking devise and disappears! Moving to the back of the bridge, she sets up a force field between her and the rest of the bridge crew, cripples the controls and jams their communications so they can't call for help.
Under cover of her cloaking devise she takes over the engine room and shuts down the containment fields on the ship's Quantum singularity power reactor, before escaping on the ships shuttle. The ship is now in danger of collapsing into a quantum singularity as it plunges towards the Borg planet. Once clear of the ship, Arai taunts her former shipmates before activating their warp drive and sending them off to crash into the Borg planet.
Arai, the Romulan operative on rendezvous with a Romulan warship, the Scimitar, to which she transports herself and the cloaking devise before blowing it up. Shortly afterwards, the Enterprise arrives and Arai, who has taken charge of the Scimitar, orders that they use to cloaking devise to masquerade as the Dallas. However seeing through their disguise, Picard orders that they fire on the "Dallas", causing the Romulan vessel to decloak and get off a shot of their own. Returning fire, the Enterprise deals a devastating blow and, finding the cloaking devise with their sensors, transports it to them, not before Arai gets close enough to be included in the transport beam.
When the cloaking devise arrives on the transporter pad of the Enterprise, we see the doors open and close by themselves - obviously Arai has switched on here personal cloaking devise. However the Enterprise has what she needs and, not knowing they have a stowaway, they warp off in pursuit of the real Dallas.
Back on the Dallas, Jureth uses a Jeffrey's Tube that leads to the engine room to bypass the Romulan force field. Getting there, he works quickly to on various controls. The warp core overheats and a gets closer to detonation, the containment doors start to come down on either side and, with seconds to spare, Jureth makes it back into the Jeffrey's Tube. The warp core is ejected just as it starts to reach critical and blows up close to the Dallas, forming a Quantum singularity that, like the Dallas is drifting towards the Borg planet.
In the Borg facility below them the sensors detect the singularity and set off a "Red Alert", which not only warns the remaining Borg but the Archeopendra. The monster Borg leaves its lair and moves out to take over a ship that then rises from the planet. Once in orbit, it meets the Dallas, which is being held back from being sucked into the singularity by a tractor beam on the Klingon shuttle. Inexplicably Kephren, who was piloting the shuttle, breaks the tractor beam and moves off. The crew face certain death either from the Borg or by drifting into the singularity but still stand defiant by grabbing what weapons they can find and standing firm to defend the bridge in the unlikely case of a Borg attack.
The Borg transport the crew from the Dallas just before it breaks apart in the singularity and they find themselves in a room full of dead Borg. Only one shows any life signs and as they watch, one of the mutant Borg spiders emerges from the carcass of the Borg and starts to attack them. With great difficulty they kill it however their respite is short-lived for, as shortly after, the walls slide up and they find themselves menaced by at least a dozen of the creatures that they only barely been able to kill one of!
On the bridge of the Enterprise, Lt Barclay is working on the cloaking devise, which starts up unexpectedly just before an "Elite" squad enters and is given its instructions by Picard and the Enterprise drops out of warp in the system that holds the Borg planet. The new cloak makes the Enterprise look like a Borg cube. The Borg are cautious however and an alert sounds on the Borg ship calling away the Borg spiders and saving the lives of the remaining crew of the Dallas. This allows Tuvok to take the opportunity to lead the crew on an attack of the Borg ship's master control facility.
Meanwhile Kephren has not run out on his comrades as they thought, he is going after the Doomsday devise on the planet's surface. Once he gets to it he is surprised to find two giant Borg who are frozen in their sleep stations, it is only when he starts to aim the weapon at the Borg ship that they awaken and attack him. Big they might be, but brains they have none and the young Klingon soon dispatches them with his trusty Batleth, unfortunately as the last one falls it topples on him, pinning him.
The Enterprise, meanwhile, is coming into a high orbit and although their disguise has held, the Borg ship appears to be too powerful.
On board the Borg vessel, Tuvok and company come upon a corridor of Borg drones in their cubicles chanting: "The Collective has lost necessary resources". As they watch, a large Borg spider bursts through the door at the other end and moves to attack them. As the ranks of Borg look on, the Dallas crew take out the spider with great difficulty and when they are successful, the Borg in unison say, "Your performance has been satisfactory The rogue Borg must be eliminated" and demounting, move out of the corridor. After some surprise, the Federation crew follows.
Safe in their disguise, the Enterprise comes up to the Borg ship and commences probing them and discovers Federation lifesigns, including a Vulcan! Picard realizes at once that Tuvok is on board, contacts him and tells him to destroy the Borg shield generator.
Tuvok and company penetrate to the inner area of the Borg ship, but discover Borg spiders guard the field generator. Tuvoks team manages to avoid the spiders and destroy the field generator, only to discover that two of his company is down, apparently attacked by a spider.
Picard transports Tuvok and his team aboard the Enterprise and then attempt to fire all weapons, only to discover that the holocloak is draining too much energy. Barclay attempt to adjust the power, causing a holocloak failure. The Archeopendra beams spiders to the Enterprise, which attack the crew, including most of the bridge crew, rendering them unconscious. However, Picard, Barclay and Kleeya are saved when Admiral Arai deactivates her personal cloak and destroys the spiders with her handweapons.
Tuvok, Jureth, Kephren and General Mi'Qoch and part of Picards away team arrive on the bridge and re-man it, although there is surprise and resentment at the presence of Admiral Arai on board. The Enterprise fires and cripples the Borg ship, causing the Archeopendra to lose what remains of his control of the Borg. The Borg kill the spiders on board their ship and begin firing on the Archeopendra, who expands himself, breaks out of the ship and flies to the Enterprise, where he perches on the hull, safe from the Enterprises weapons.
The Archeopendra activates the corpses of the fallen crewmembers, which are now Borg/Human/Spider hybrids. The bridge crew cannot defeat even one of these super-powerful beings so the bridge is quickly captured, resulting in numerous injuries. The hybrids assimilate the Enterprise and the Archeopendra crawls over the top of the bridge, injects his tail into the Enterprise hull, thereby becoming a single unity with the ship. The bridge crew is helpless now that the hybrids have completely adapted to all available weaponry.
Tuvok accesses the computer and discovers that the Archeopendra is altering ships systems, making them more efficient and powerful. Picard realizes that he must destroy the Enterprise lest the Archeopendra become too powerful. When he learns that self-destruct systems are disabled, Picard, using his persona as Locutus, orders the Borg to attack the Enterprise and then uses the holocloak to drain the power from the ship.
The Borg manage to fire a brace of torpedoes into the Enterprise, but it is not enough to destroy the ship. The Archeopendra sets course to the Klingon home world, intended to destroy it and then the rest of the Alpha quadrant, saying existence as you know it is over. At that moment, the Archeopendra is hit with a burst of energy from the planet surface. Kephren has activated the Ion cannon, destroying the Archeopendra.
Unfortunately, Kephren is trapped on the planet and, despite the Enterprises rescue attempt, dies when it slips into the singularity, thereby closing the black hole. The remaining Klingons, however, are pleased rather than otherwise, since his action saved the Enterprise and the Klingon Empire. Picard throws Admiral Arai into the brig after Tuvok disables her personal cloak, thereby signaling that hes decided to break the alliance with the Romulans.
After all, Picard realizes that the Federation now has the holocloak, as well as all the newest Borg technology (like mass replicators) and Archeopendras biotechnology.