The movie begins after a mysterious man throws a t-Virus capsule on the ground. The virus liquidates from its crystalline form and turns into a gas spreading throughout the Hive. As a quarantine, the Red Queen seals the facility and kills everyone inside. On the outside at the secret entrance to the Hive in a mansion in the Arklay Mountains on the outskirts of the city a nerve gas was released.
Alice, the head of security at the Hive and the secret entrance, fell unconscious from the nerve gas and suffered from memory loss including all of her memories of Umbrella. Shortly after, an environmentalist, Matt Addison, gets into the mansion about the same time Umbrella's biohazard team breaks in. They quickly apprehend the two and move to the underground train leading to the Hive. After restoring the train's power and moving toward the Hive, J.D. opens the door to the next car where Spence Parks collapses and is introduced. He suffered from the same nerve gas Alice was introduced to.
The group quickly makes it to an experimental storage room where Matt, J.D., and Rain Ocampo stay. The rest of the group advances to the Queen's chamber. Chad Kaplan shuts down the security systems so they can proceed.
One, Olga, Twelve, and Alfonso Warner proceed through the hallway, where they are sealed by the Red queens security system. Alfonso was the first to see the laser, but as it came it ripped Drew's fingers off, and ended Olga's life as well, by decapitation. As the Laser passed by a second time, Alfonso tried to dodge it promptly by jumping, the laser promptly killed him as well by slicing him through the torso. Finally as the final laser came through, One died as the laser turned into an impossible to dodge grid. Kaplan tries to deactivate it, but doesn't succeed until after everyone is dead. Shortly thereafter Kaplan and Alice proceed to shut down Red Queen. Because of the shut down, all electronic units, including the doors and seals trapping the infected people inside are opened.
As this happens, Rain and J.D. come across a zombie. Not knowing it was actually a zombie, it bites Rain's hand, infecting her. Rain and J.D. are quickly rattled by its persistence to move even after several rounds of bullets were fired at it. Alice, Kaplan, and Spence return to Rain and the others afterwards. During this time they are surrounded by zombies and the group uses most of its ammunition. J.D. is separated from Rain and is devoured by a horde of the infected zombies.
Rain, Kaplan, and Spence return and barricade themselves in the Queen's chamber. Matt enters the offices searching for his sister Lisa only to find that she has been infected. Alice saves Matt and kills Lisa... again. It is then that Matt explains why he's there. His sister, Lisa, had infiltrated the Hive and had a contact there to steal the t-Virus and expose Umbrella to the world. Lisa was supposed to use this contact to get the virus and exit the Hive and give the virus to Matt so he could expose Umbrella.
Alice and Matt return to the Queen's chamber. After being boxed in with no escape, Alice reactivates the Red Queen and keeps her on remote activation for insurance. In doing so, they were able to blackmail the Queen for info on the virus and a way to escape.
They exit through storage tunnels where they are attacked again. Rain is then infected for the third and fourth time since the first undead encounter. Kaplan is separated from the group some time later. Alice, Matt, Spence, and Rain reach the surface afterward. Rain by this time has been infected on a massive level and all of her senses are impaired including lack of strength to walk. About that time, Alice remembers about the Anti-Virus, the cure to the t-Virus. They enter the experimental room to recover it only to find it missing. Spence then regains his memories and it is revealed that he was the one who let the virus go free. He would then use the remaining capsules on the black market and make himself a rich man. When Alice refuses to go with him he leaves the room holding everyone at gunpoint and seals the exit.
As he returns to the train to surface, he is killed by one of the Hive's early experiments with the t-Virus called the Licker. Red Queen didn't tell them of its escape because she hadn't expected anyone to survive that long without becoming infected. It was her back-up plan. The Licker then finds them and tries to break in while the Red Queen agrees to give them access to leave if they kill Rain. Even with the Anti-Virus on the train, the t-Virus had infected her on a massive level and there was no guarantee that the Anti-Virus would work. Kaplan then returns and shuts down the Red Queen, opening the door so that they can escape as the Licker enters from the opposite entrance. They make it to the train and travel to the surface. Rain is given the Anti-Virus, and Kaplan is as well, but the Licker returns and kills Kaplan and infects Matt. The Licker turns targets Alice. Alice manages to secure its tongue into the ground with a pipe while Matt goes to open the storage hatch it's standing on. Rain, who has been turned into a zombie, attacks Matt. Matt kills her swiftly as she falls on the hatch mechanism and the Licker is caught on the tracks, being ignited and left behind to burn.
As Alice and Matt reach the surface, they are abducted by Umbrella scientists and Matt is used in the Nemesis program while Alice is used in a separate one. The remaining scientists reopen the sealed Hive to find out what happened. When Alice awakens at the Raccoon City facility several hours later, the infection had spread throughout the city and Alice finds and loads a shotgun ready for the next nightmare.