Dr. Krippen (Emma Thompson) is interviewed on TV about her great discovery: she has changed the measles virus genetically so that it attacks cancerous cells. She says that all the tested patients who used to suffer cancer had recovered. Some years later: New York is empty as far as people are concerned: grass covers roads and buildings, abandoned cars are everywhere, etc. It seems that apocalypse has arrived.
Robert Neville (Will Smith) used to be a military doctor. He is driving and Sam, his dog, is with him when a herd of deer suddenly sprouts from nowhere. He runs after them and tries to hunt one deer down. A lion is faster than him. Robert is about to shoot the lion and the deer, but his watch starts beeping. He goes back home. His home is the typical American detached house, but it looks as though it were in the middle of a war zone. Neville lives with Sam there. They have dinner while watching old-fashioned TV programmes. After a bath, Neville shuts, locks and protects every door and window with massive steel shutters. He sleeps close to Sam.
He remembers how Zoe (Salli Richardson), his now-late wife and their child Marley (Willow Smith) and Sam the dog as a puppy try to leave New York. Robert will stay on his own in order to try to stop the virus. They tell Marley they are going on holiday. The viewers realise that it was a dream which gets interrupted as Robert wakes up.
At his prison-home, Robert makes exercise and goes down to the basement, where he keeps a mini-laboratory. He's tried the vampire virus in some mice in order to find a vaccine. All the mice look incredibly aggressive, except for one. Robert will have to inject the blood of that mouse into a vampire to see if the vampire revents back to human life.
Later, Robert goes to a video-rental store where he talks to carton mannequins. The audience realises that he is the only remaining human being in New York. Then, he registers some condo flats nearby, watching sadly the remains of the people who used to live there. Later, he sends a radio message saying that he's alive, and that he'll be waiting for more survivors at the docks of the bay at midday everyday. Today, Sam spots the deer again, so Robert and Sam go after it. The deer runs into an old building, and Sam goes after it, although Robert has tried to hold Sam back.
Robert enters as well. Carefully, he locates the corpse of the deer and Sam, hiding down in a hole. Robert has to kill a vampire, and both Sam and Robert start running away. Some more vampires appear and chase them. He fights them all and both are able to get out of the building. The leader vampire (Dash Mihok) cannot run after them because its plain daylight outside. Soon afterwars, Robert sets a trap to catch a vampire. He succeeds and takes a female vampire (Joanna Numata) home, to his lab. He tries the cure he's hopeful for.
That night, he dreams how his wife and child try to live New York in the chaos of its evacuation. He needs to intervene and force a soldier to check his wife's non-infected status. The next second, he wakes up again, with a deeply sad face.
The next morning, he remembers it's his birthday. When he goes to the video store, the vampires have set the same trap he organized for the female vampire, hanging one of the video-rental mannequins from a building nearby. Robert passes out. When he wakes up, he is badly hurt, hanging down and bleeding a little bit. Sam is faithfully waiting for him. He sets himself free finally when it's starting to become dark, but his leg gets badly cut with his knife. The vampires appear with infected dogs, but Sam defends Robert, who succeeds in crawling back to the safety of his car. This saves Robert's life, but when he gets home and puts Sam on top of the surgery table, he realises that she had got infected and will become a vampire dog soon, so he finishes her off by breaking her neck, tears streaming down his cheeks.
He decides to fight all the vampires face-to-face in a frenzy. He ends up in a wrecked car and about to die, but he suddenly wakes up in a house where a boy is watching Shreck first installment. While sleeping, he has dreamt about the helicopter where his wife and child had died in falling down. The people who rescued him are Anna (Alice Braga) and her son Ethan (Charlie Tahan), who have heard Robert's radio message while passing through the city. Anna wants to go outside of New York, to a human haven somewhere. Robert, however, now insists that he'd much appreciate to be left alone. Robert doesn't believe that such a place exists.
When they are arguing about this, Robert realises that the vampires are attacking them because Anna didn't take the caution of waiting for daylight to take Robert home. Although Robert's home deffensive system is really good, there is a whole crowd of vampires, so they finally overflow the security meassures and enter the home. Robert, Anna and Ethan end up in the basement lab.
Among the hectic fight, Robert has time to realise that the former female vampire has come back to her human form. He takes a sample of her blood in a syringe and gives it to Anna, telling her to leave through a small trap-door with Ethan. Robert stays back to kill as many vampires as he can, blowing them to pieces with himself, including the vicious alfa-vampire who has made a personal quest out of hunting Robert down.
Anna and Ethan reach a strange place in the middle of the countryside: the road is cut by a castle-like wall and a steel door. There, some human survivors live in that enclosed community. Anna gives the syringe with the antidote to the human leader of that small community.