Robert Neville is the last human in New York City, and is surrounded by Darkseekers.
Robert Neville is in a car with his wife Zoe and daughter Marley as they listen to the radio where the military confirm that the Krippen virus has gone airborne. Robert Neville tells Zoe his plans of staying in New York in order to find a cure, his wife disagrees but before they can continue their car is attacked by a Darkseeker. but are able to progress to the evacuation center where his wife fails a test. Robert orders the soldier to take it again, this time positive. Zoe and Marley get on a helicopter and Marley gives Sam to Robert, Robert waves goodbye but the Darkseekers attack another helicopter causing the two to crash resulting in the death of Zoe and Marley. It's unknown what happens after this but It's most likely that Robert falls to depression and watches the military fail at containing the Darkseekers .
In September 2012, military virologist Lieutenant Colonel Robert Neville is the last human in New York City, and maybe the last human on Earth. A genetically-engineered variant of the measles virus created by Dr. Alice Krippin, meant as a cure for cancer, had mutated into a lethal strain. It spread throughout the world, killing 90% of humanity. The remaining 588 million survivors became predatory and vampiric beings called Darkseekers, that emerge after dusk to prey on those immune to the virus. In December 2009, Robert had lost his wife Zoe and daughter Marley in a helicopter accident during a chaotic quarantine of Manhattan. He is forced to watch helpless from the ground and survives along with the family dog, a German Shepherd named Sam.
Robert's daily routine includes experimenting on infected rats to find a cure for the virus and trips through a decaying Manhattan to collect food and medical supplies or hunt for deer that have wandered into the city from other regions. Lions and possibly other animals have escaped from the Central Park Zoo and are thriving as wild animals seem unaffected by the virus and if bitten or scratched by infected people, can only recover or die normally. He keeps vigil each day for a response to his recorded AM radio broadcasts, which instruct any survivors to meet him at midday at the South Street Seaport, where he carefully sits on a bench and waits every day. Neville's isolation is broken only by the companionship of Sam and interaction with mannequins he has set up as patrons of a video store.
He lives in a Washington Square Park townhouse, which he has shielded with UV projectors and iron shutters inside the windows. He has also set up several generators in the house to provide electricity.
One day, he is hunting deer with Sam, who chases a deer to an abandoned dark building. He finds the deer dead and discovers the dog hiding and realizes the building is full of infected Darkseekers. He then flees with Sam. To test a treatment, Robert sets a snare trap and captures an infected woman. In his laboratory in the basement, Neville tries the new serum on the infected woman, seemingly without success.
The next day, after finding one of his mannequins moved out in the street in front of Grand Central Terminal, Robert is caught in a snare trap and passes out. He regains consciousness at dusk and frees himself, but a pack of infected dogs attack Robert and Sam. During the fight, one of the infected dogs bites Sam. Domestic animals or animals adapted for a human setting seem to be infected and suffer just like humans as dogs and urban rats can be infected. Robert brings Sam home and attempts to save the dog by injecting a strain of his serum, but it is too late. Sam starts to mutate, forcing Robert to strangle her to death.
Overwhelmed by grief and rage, Robert attacks a group of Darkseekers in the Seaport the following night with his Ford Expedition equipped with UV lights. He kills many, but they overwhelm and nearly kill him before he is rescued by a pair of immune humans, a woman named Anna and a boy named Ethan, who followed his radio broadcasts from Maryland. Anna and Ethan take Robert back to his home. Anna explains that they are making their way to a survivors' camp in Bethel, Vermont. Robert does not believe such a camp exists and expresses doubt when Anna says God told her about it.
The following night, an Alpha Male leads an infected mob in an attack on Robert's house. Anna, who was unaware of Robert's precautions in covering his scent outside the house, had inadvertently allowed the Darkseekers to follow their trail. As the Darkseekers charge the house, Robert stops the first wave with UV light projectors, which others destroy. Robert also destroys the second wave with mines planted in the yard, but he finds himself defenseless against the third wave. As Robert tries to find Anna and Ethan, the Alpha Male and another Darkseeker enter the house, and the Alpha Male attacks him. As Robert fends off the Alpha Male the other Darkseeker rushes upstairs and begins tearing a hole in the roof so others can get in.
After Robert saves Anna and Ethan, they retreat into the laboratory. They seal themselves in a glass-walled room with the infected woman and discover that Neville's treatment is working; the subject looks much more human. The Darkseekers break in and the Alpha Male begins to throw himself against the glass, cracking it into the shape of a butterfly. Robert then sees Anna's butterfly tattoo and thinks of his daughter Marley, who used to make a butterfly shape with her hands (a brief voiceover of Marley mentioning butterflies plays). Robert then draws a vial of the infected woman's blood and gives it to Anna, before shutting her and Ethan inside a coal chute in the back of the lab. He then detonates an M67 grenade to destroy the attackers at the cost of his own life.
Anna and Ethan arrive at the survivors' colony, where Anna hands over the antidote. Anna later states that the survivors are Robert's legacy, as his fight for a cure became legend.
Anna and Ethan are able to find the survivor's colony and Anna gives the serum to a Soldier who lets them in to the survivor's colony. Anna and Ethan are finally safe and Anna narrates: "In 2009 a Deadly Virus burned through our civilization pushing human kind to the edge of extinction Dr. Robert Neville dedicated his life to the discovery of a cure and the restoration of humanity. On September, 9th 2012 approximately 8:49 pm he discovered that cure and at 8:52 he gave his life to defend it, we are his legacy."