In the 20th and 21st Centuries, the villainous Brainiac was one of the universe's most lethal threats, constantly battling Superman. Although an A.I., Brainiac had a humanoid "son" named Vril Dox on the planet Colu. Dox, who was also brilliant, later had a child, and the title "Brainiac" became an honorific on Colu. In the 31st Century, Coluan teenager Querl Dox was granted the name "Brainiac 5," for his advanced Twelfth-Level Intellect. An average human has a Sixth Level Intellect, while an average Coluan has a tenth level, making Brainiac 5 the smartest person on his homeworld.
He soon joined the newly formed Legion of Super-Heroes, where Brainiac 5, or "Brainy" as his friends called him, became a truly invaluable member of the team. He joined the team during the same period as Supergirl, who was visiting from the past, and whom he would harbor feelings for; it would prove to be a love that would last several years.
Brainiac invented the Legion's flight rings, which allows for all members to have the ability to fly. He also created an anti-lead serum that allowed Mon-El to leave the Phantom Zone and join the team. Brainiac also invented the Legion's Time Bubbles, which allowed them to time travel to the past. But for all his contributions to the team, he has also been behind some of their biggest catastrophes. Brainy once created an advanced AI which he called COMPUTO, which turned against the team and killed one of Triplicate Girl's duplicates. He also accidentally transformed Professor Jaxon Rugarth into the supremely powerful Infinite Man. He later became mentally unstable, and used the Controllers' Miracle Machine to create the near unstoppable Omega.
After these incidents, Brainiac left the team and became a member of the Legion of Substitute Heroes, which he led for a brief time. Once he cured his teammate Matter Eater Lad's insanity, which was caused by eating the Miracle Machine as a way of stopping it, he was readmitted into the Legion proper. After the death of his beloved Supergirl during the cosmic event known as the CRISIS ON INFINITE EARTHS, Brainy fell into a deep depression, although he was eventually able to move past it.
During the ZERO HOUR crisis in time, a new version of Brainiac 5 emerged. This version of Brainy's mother had the title of Brainiac 4 and was one of his homeworld of Colu's most well regarded scientific minds. She abandoned her son the very day he was born, as she wanted to continue her research, and she saw a baby as nothing but a distraction. Her son Querl became even more intelligent than she was however, and was soon drafted into the government sponsored Legion of Super-Heroes. When his version of the Legion became trapped in the past, he was instrumental in getting his team back home to their proper time. This Brainy was later revealed to come from Earth-247.
On Earth Prime, a version of Brainiac 5 was even more unfriendly than his previous versions, and often tried to usurp the leadership of the team from Cosmic Boy. Unlike previous realities, this version of Brainiac 5 was in a relationship with Dream Girl, and eventually married her.
The original continuity version of Brainy returned as an adult, and was a central figurel during the Lightning Saga, which brought back Wally West to the 21st Century. Brainiac 5 and Cosmic Boy eventually discovered that the United Planets were preparing to invade the Earth, as it had been overrun with xenophobic zealots. In an effort to delay the invasion, Brainy set himself up as Colu's dictator for a temporary time. During the event known as LEGION OF 3 WORLDS, Brainiac helped restore Bart Allen and Superboy Conner Kent to life in the 31st Century.