In the aftermath of Data's desertion to join the Borg, Beverly Crusher commands a skeleton crew aboard the U.S.S. Enterprise while most of the ship's crew, led by Picard, search a remote planet for their comrade. Upon sighting the Borg ship, Beverly retrieves as many crew members as she can and escapes, leaving Riker and Worf behind to search for Picard's group. Meanwhile, Picard, Troi, and Geordi are held prisoner by Data's evil brother, Lore, who assumed leadership of a group of Borg that includes Hugh, the young Borg who spent time on the Enterprise. Lore took charge of the Borg on Hugh's vessel after Hugh's new sense of individuality nearly destroyed his shipmates by disrupting their sense of shared identity. Lore says he provides the Borg with leadership, while the Borg regard Lore and Data as superior beings because they are fully artificial life forms. Picard attempts to communicate with Data, but his former crewmate barely acknowledges him and instead imprisons them in a cell. Troi points out that the only emotions Data feels are anger and hate, but Data is unmoved by her concern, and instead takes away Geordi's VISOR.
Later, Lore tells Data of his plan to conduct dangerous, possibly deadly experiments on Geordi. Meanwhile, Geordi, Picard, and Troi converse quietly in their cell, where Geordi theorizes that Lore is controlling Data by transmitting the negative part of his emotional program to his brother. He also believes Data's ethical program has been dismantled, and that if he can find a way to generate a kedion pulse, that program might be reactivated. Riker and Worf, still trying to locate the others, are captured by a group of Borg, and are surprised to see that Hugh is among them.
Hugh is bitter and angry. He blames the Enterprise crew for destroying the Borg, but does not support Lore. The only warm feelings he has are for Geordi, who befriended him on the Enterprise. Riker tells him he thinks Geordi has been captured, and Hugh agrees to show them into the compound. Inside, Data subjects Geordi to the deadly neurological experiments.
While this goes on, Picard and Troi steal part of a transceiver and, when a groggy Geordi returns, they modify it to emit a kedion pulse, restoring Data's ethics. Data tells Lore that he feels conflicted about hurting his friends, and Lore responds by cutting down on the flow of emotions to Data's brain. Like an addict, Data begs for more, and Lore responds by flooding him with negative feelings. As Data walks off, Lore tells his Borg henchman, Crosis, that he no longer trusts his brother.
Lore announces ominously that Picard is about to take part in an important "ceremony." Lore also announces that Data must prove his loyalty by killing Picard. Data refuses, and Lore sadly tells Data that he must then die as well. But at the moment he is about to murder his brother, Hugh steps forward from the crowd of Borg and knocks Lore's weapon away. Riker and Worf arrive at the same time with phasers blasting. Data follows Lore, who tries to escape to the lab, and Data is ultimately forced to fire on, and then deactivate, his brother. Later, Data reunites with his friends and they prepare to leave, while Hugh assumes the position of leader of this Borg group.