The book's ending is better. From wikipedia:

Neville encounters an apparently uninfected woman named Ruth; startled, she runs away. Neville chases her and after a struggle drags her back to his house. Suspicious that she is infected, Neville questions her. He reveals that as well as vampires, he kills the infected, believing that sooner or later they will die and come after him. Despite their mistrust, Neville and Ruth share an evening of platonic love.

However, when Neville performs a blood test on her, her infection is revealed. Ruth knocks him out and escapes, but leaves a note, explaining that she was a spy from a primitive new society; her people are infected but have discovered a means to hold the disease at bay. She warns him to leave before they come to destroy him. Neville decides to stay.

Months later, hunters from the new society capture Neville, and take him for public execution. Before he can be executed, Ruth provides him with pills so that he will feel no pain. Neville takes the pills; before he is executed he reflects on how the new society regards him as a monster. Just as vampires were regarded as legendary monsters that preyed on the vulnerable humans in their beds, Neville has become a mythical figure that kills both vampires and the still-living while they are sleeping, thus the book ends with his final revelation: "I am legend."


Not wanting to write a frigging book report, but the proper meaning of the film's title is that Neville becomes an oddity just as the infected were oddities to the uninfected.