In 2009, a genetically re-engineered measles virus, originally created as a cure for cancer, turns into a lethal strain which kills 90% of those it infects, and mutates the remaining 10% into predatory, nocturnal mutants called “Darkseekers” who are extremely vulnerable to sunlight and other sources of UV. Three years after the outbreak, US Army virologist Lieutenant Colonel Robert Neville (Will Smith) lives an isolated life in the ruins of New York City, which is now deserted, unsure if any other uninfected humans are left in the world.
The effects of the virus vary in other species. Animals that coexist with humans like rats and domestic dogs are infected but wild animals like deer and lions are unaffected. The city has fallen into ruins and overgrown vegetation covers crumbling buildings and wild deer roam the streets while being preyed upon by lions that have escaped Central Park Zoo. Neville’s daily routine includes experimentation on infected rats to find a cure for the virus and trips through Manhattan to hunt for food and supplies. He also waits each day for a response to his continuous recorded radio broadcasts, which instruct any uninfected survivors to meet him at midday at the South Street Seaport. Flashbacks reveal that his wife (Salli Richardson) and daughter (Willow Smith) died in a helicopter accident during the chaotic evacuation of Manhattan, prior to the military-enforced quarantine of the island in 2009, in which Neville stays behind on the island as military personnel. Neville’s loneliness is mitigated by the companionship of his German Shepherd Sam (given to him by his daughter Marley as a puppy before she died in the helicopter crash to protect him), interaction with mannequins he has set up as patrons at a video store, and recordings of old television broadcasts. At night, he barricades himself and Sam inside his heavily fortified Washington Square Park home to hide from the Darkseekers. One day while waiting for survivors, Sam follows a deer into a dark building while she and Robert were hunting. Neville cautiously goes in after her and finds the deer’s corpse along with Sam, but the building is infested by a colony of Darkseekers, both manage to escape unharmed and the attacking Darkseekers are killed by the sunlight.
Neville finds a promising treatment derived from his own blood, so he sets a snare trap and captures a female Darkseeker while a male Darkseeker (termed “Alpha Male” in the script, and played by Dash Mihok) watches from the shadows. Back in his laboratory in the basement of his house, Neville treats the female without success. The next day, he is ensnared in a trap similar to the one he used to capture the female, and by the time he manages to escape, it is dark and he is attacked by infected dogs. Neville and Sam manage to kill them, but Sam is bitten in the fight. Neville brings Sam home and injects her with a strand of his serum, but when she shows signs of infection and tries to attack him, Neville is forced to strangle her to death. The next night, driven over the edge by loneliness, he ventures out and suicidally attacks a group of Darkseekers. He is nearly killed, but is rescued by a pair of immune survivors, Anna (Alice Braga) and a young boy named Ethan (Charlie Tahan), who have traveled from Maryland after hearing one of his broadcasts. They take the injured Neville back to his home, where Anna explains that they survived the outbreak aboard a Red Cross evacuation ship from São Paulo and are making their way to a survivors’ camp in Bethel, Vermont. Neville angrily argues that no such survivors’ camp exists.
Neville once again attempts to administer a potential cure to the infected woman in his laboratory, but the next night, a group of Darkseekers, who had followed Anna and Neville back the night before, attacks the house and overruns its defenses. Neville, Anna, and Ethan retreat into the basement laboratory, sealing themselves in with the female Darkseeker on which Neville has been experimenting. Discovering that the last treatment was successful, Neville draws a vial of her blood and gives it to Anna, before shutting Ethan and her inside a coal chute in the back of the lab. He then takes a grenade and kills the Darkseekers and himself, saving the cure.