In March 1975, biological warfare between the People's Republic of China and the Soviet Union kills most of the world's population. U.S. Army Lieutenant Colonel Robert Neville, M.D., a scientist based in Los Angeles, California, begins to succumb to the plague but injects himself with an experimental vaccine just in time, rendering himself immune. The plague's surviving victims, meanwhile, join together as "The Family," a cult of nocturnal albino mutants who seek to destroy all technology.
Two years later, Neville believes he is the plague's only survivor, struggling to maintain his sanity. He spends his days hunting and destroying members of The Family. At night, living atop a fortified apartment building equipped with an arsenal of automatic firearms (such as a Smith & Wesson M76 submachine gun and an infrared sight-equipped Browning Automatic Rifle), and explosives (such as satchel charges), he is a prisoner in his own home. The Family wants to destroy him, believing him to be a last remnant of the old culture.
One day, The Family captures Neville in a wine cellar. After a summary trial he is found guilty of heresy by Jonathan Matthias, a former news anchor who is now leader of The Family. Neville is sentenced to death and nearly burned at the stake in the center of Dodger Stadium. He is rescued by Lisa, a woman he had earlier seen while on patrol, and Dutch, a former medical student familiar with Neville's work.
Lisa and Dutch are part of a group of unmutated survivors; although infected, their youth has given them some resistance to the disease and its symptoms are slow to manifest. Nevertheless, given enough time, they will succumb to mutation and become new members in The Family. Neville is amazed to find that some of the survivors include very young children. Neville later has a brief romance with Lisa.
Neville realizes that even if it is possible to duplicate the original vaccine, it would take years to salvage humanity. However, he believes it may be possible to extend his immunity to others by creating a serum from his blood. If the serum works, Neville and Lisa plan to leave the ravaged city with the rest of the survivors and start a new life in the wilderness, leaving The Family behind to die.
Neville is successful in creating the serum and administers it to Lisa's teenage brother Richie, who is on the verge of the advanced mutant stage of the plague. Once cured, Richie (insisting that members of The Family are also human) goes to The Family to try to convince them to take the serum. Matthias refuses to believe that Neville would try to help them, accuses Richie of being sent by Neville to harm them and has Richie executed. Neville discovers Richie’s body strung up and left as bait to draw Neville outside after dark. Enraged, Neville fights off The Family after they force his car off the road.
Meanwhile, Lisa unexpectedly changes into a nocturnal albino mutant and betrays Neville by giving The Family access to his bunker. Returning home, Neville is confronted by Matthias, who forces him to watch as The Family sets his home on fire. Neville breaks free and, once outside with Lisa, he turns and raises his sub-machine gun to shoot Matthias, who is looking down from the balcony. The gun jams, giving Matthias enough time to hurl a spear at Neville, mortally wounding him. It is assumed that Matthias and The Family choose to stay inside Neville's home as it continues to burn. Lisa claims to be part of The Family, but stays by the fountain with Neville until dawn.
The final scene shows the human survivors, led by Dutch, departing in a Land Rover. They discover a dying Neville, who hands Dutch a flask of blood serum, presumably with which to restore humanity. Shortly after handing over the serum Neville dies in a fountain, symbolically posed in the traditional position of the crucified Christ. Dutch takes Lisa and the survivors away as they leave the city for good, leaving the Family to die, as Neville planned.