- "There is only one path to peace... the Avengers' extinction."
- ―Ultron to Avengers
During the Attack on the HYDRA Research Base, Tony Stark captured the Scepter, but before that, Scarlet Witch showed him an illusion where all of the Avengers, excluding Stark, were dead or dying and Earth was occupied by Chitauri. Stark realized that the world needed better protection than the Avengers could provide. Together with Bruce Banner, Stark explored the stone that was contained in the Scepter and found an artificial intelligence inside it. Stark saw it as a key to a peacekeeping program he was developing called the Ultron Program. Within three days, Stark and Banner configured a suitable AI structure and left J.A.R.V.I.S. to complete the construction.
However, the AI became unexpectedly sentient, beginning to question its existence and purpose. Upon J.A.R.V.I.S.' informing of his purpose to the AI, it acted in defiance, scouring the Internet for information on its creator. Before J.A.R.V.I.S. could inform Tony Stark of the AI's singularity, it attacked J.A.R.V.I.S. and the latter went into hiding.
Ultron then started constructing his first body out of Iron Legion parts. His chosen visage was sourced from an Iron Legion drone that was damaged earlier from corrosive matter thrown at its face by a Sokovian civilian protesting against the Avengers.
Some hours after creating Ultron, Tony Stark organized a party at Avengers Tower to celebrate the victory over HYDRA. Lots of guests were invited, including James Rhodes and Sam Wilson. Some time later, when just the Avengers, Rhodes, Dr. Helen Cho and Maria Hill stayed in the Tower, Thor offered the Avengers the opportunity to lift Mjølnir. All except Natasha Romanoff, who did not participate, unsuccessfully tried to lift it; Steve Rogers managed to move it slightly.
Suddenly, a sharp, loud sound occurred and Ultron in an Iron Legion body came into the hall from the laboratory. He described the Avengers as killers, and four drones broke the wall between the lab and the hall and attacked the Avengers. Stark and Rhodes attempted to run for their suits, but were knocked down by a drone. Romanoff and Bruce Banner hid behind a bar; she told him not to turn green. One of the drones captured the Scepter in the process and flew away. Rogers jumped on the back of a drone and it slammed him into a wall and onto the floor. Stark also jumped on the back of a drone and disabled it with a metal rod. A drone cornered Cho but Ultron ordered it to spare her life before Rogers threw it to Thor, who destroyed it with his hammer. Hawkeye found Captain America's Shield and threw it to Rogers, who destroyed the last remaining drone.
The Avengers turned their attention to Ultron, who told them that the only path to peace was their extinction. Thor threw his hammer and destroyed Ultron's body, but Ultron's consciousness escaped through the internet.
- "All our work is gone. Ultron cleared out, used the internet as an escape hatch."
"He's been in everything. Files, surveillance. Probably knows more about us than we know about each other."
"He's in your files, he's in the internet. What if he decides to access something a little more exciting?"
"Nuclear codes. Look, we need to make some calls, assuming we still can."
"Nukes? He said he wanted us dead."
"He didn't say dead. He said extinct."
- ―Bruce Banner, Steve Rogers, Natasha Romanoff, James Rhodes and Maria Hill
Ultron flew to the now abandoned HYDRA Research Base in Sokovia, where he created a new and more advanced body for himself. He then proceeded to make contact with Wanda and Pietro Maximoff who were also determined to destroy Tony Stark and the Avengers. With their assistance, Ultron hunted down Ulysses Klaue, an arms dealer who sold Vibranium, one of the strongest metals on the planet, and found him at a Salvage Yard in Africa. The Avengers tracked Ultron down and battled him, leading to the Battle at the Salvage Yard.