Following a career of unsuccessful attempts to erase Superman from history, the villainous Time Trapper plucks Superboy-Prime from the time stream and drops him in 31st Century Smallville. Enraged to discover his minimal impact on history, Superboy-Prime breaks all of the Legion's villains out of Takron-Galtos and leads them as a massive new Legion of Super-Villains in a bid to destroy everything that Superman has inspired, including the Legion of Super-Heroes and the United Planets. The villains quickly travel to Sorcerer's World to recruit Mordru before continuing on to Earth, killing current Green Lantern Rond Vidar in the process. The Time Trapper also witnesses the assassination of original Legion financier, RJ Brande.
The Legion of Super-Heroes, who are devastated by Brande's death, summon Superman from the past to assist them. Superman leads the Legion into battle against the escapees from Takron-Galtos. Brainiac 5, having been forewarned of Superboy-Prime's invasion by Dream Girl's premonition, sets in motion a contingency plan that involves recruiting three of Superboy-Prime's biggest foes.
Mon-El and Shadow Lass return Rond Vidar's body to Oa, and they recruit Superboy-Prime's nemesis, the immortal Sodam Yat (the last remaining Guardian of the Universe), into the war. Three Legionnaires are sent back to 20th century Smallville to retrieve a strand of hair from a young Lex Luthor and former member, Starman recovers a body from a grave in the 21st Century. Brainiac 5 visits the Justice League's old headquarters and uses their "Multiverse nexus crystal ball" to summon the Legions from two parallel universes, most of whom join the main battle against the Legion of Super-Villains.
Brainiac 5, with the help of his own counterparts, uses a lightning rod, plus XS running on a Cosmic Treadmill (powered by the various incarnations of the Ranzz twins) to resurrect Bart Allen aka Kid Flash from the Speed Force. The team of Legionnaires recently sent back in time had used the lightning rod to "bottle up" Bart's essence before his death at the hands of the Flash Rogues Gallery.
As Kid Flash joins the battle against Superboy-Prime, Brainiac 5 and his team travel to Superman's Fortress of Solitude to enact the final phase of his plan. Using a Kryptonian healing chrysalis buried under the ice 1000 years earlier by Starman in the 21st Century, they place Lex Luthor's hair into the chrysalis and the device resurrects Conner Kent, (a.k.a Superboy) who attacks his murderer, Superboy-Prime.
Meanwhile, Superman and the three Legion founders (Lightning Lad, Saturn Girl and Cosmic Boy) are forcefully removed from the battle and taken to the end of time by the Time Trapper, who is now revealed as an aged Superboy-Prime. He states that he became an anomaly that could not be killed after being shunted into the Multiverse by the Guardians of the Universe, and thus became the sole survivor of all creation. The founding Legionnaires use the Time Trapper's own time portals to summon multiple versions of the Legion from across the Multiverse, who manage to knockout the Trapper.
The three Legionnaires and Superman return to the 31st century with a recovering Time Trapper, who faces his younger self. Refusing to accept the older version as his future self, Superboy-Prime punches his future self, causing both of them to vanish. The three Brainiac 5’s reveal that the Time Trapper that the Legion knew no longer exists as the future was reset when Superboy-Prime punched his elder self.
After the battle is over, the Legion, whose universe was lost in the Infinite Crisis, decide to travel the Multiverse seeking other lost survivors, with team member Ferro renaming this group as the new Wanderers. XS and Gates stay behind and join the original Legion of Super-heroes. Brainiac 5 reveals to the "third" Legion that they were from Earth-Prime (Superboy-Prime's homeworld). The two Legions depart, even as Superman returns to the 21st Century with Conner Kent and Kid Flash.
The epilogue reveals an apparently powerless Superboy-Prime awakening on a reborn Earth-Prime. Reunited with his parents and his girlfriend Lori, who are horrified by what he's become, having just read all the comic books he had appeared in since "Crisis on Infinite Earths".
This 2008 "Final Crisis" tie-in mini-series was written by Geoff Johns, and illustrated by George "everything plus the kitchen sink" Perez and Scott Koblish.