In this adaptation of Richard Matheson's classic horror novella, Will Smith plays Doctor Robert "Legend" Neville, the last man alive in a city overrun with CGI vampire mutants.
In the film's original ending, Neville is trapped as vampires break through his barricades and infiltrate his hideout (who would have guessed that locking yourself in an enclosed space in the middle of a city full of vampires would turn out to be a bad idea?). Then he blows them up.
Yeah. In the original, the vampires are revealed to be thinking, benevolent creatures who were merely attempting to rescue a vampire that Neville had captured earlier.
Not only does the book end in a similar way, but it in fact was the entire freaking point of the book. That's where the title "I Am Legend" came from, Neville's realization at the end that the vampires were the good guys and that he was the monster of their legends, since he had been mindlessly driving stakes through their heart at every opportunity. Maybe a title like So I'm The Asshole would have been clearer.
Because test audiences apparently didn't like the original ending, the studio opted to go with a new one in which Neville fights back against the vampires to protect his new allies. He does so by igniting a grenade about two inches from their face, destroying the once-safe stronghold and severely injuring his companions. It should also be noted that going by the original ending, Will Smith just murdered scores of reasoning creatures who were attempting to rescue a little girl.
This brings up the other problem, which is that all of the little hints that had been inserted along the way indicating the creatures had intelligence (the complex traps they set, the same creature reappearing in some kind of leadership role) are completely ignored. In the new ending, the vampires are mindless savages with no other purpose but general horror movie mayhem.
Perhaps the saddest thing about all this is that it shows that no one involved really believed in the message of the final product. They didn't produce a film in order to convey any kind message, they just strung together a bunch of cool scenes and called it a movie. One more reason why audience feedback isn't always the best guide, as anyone who has read YouTube comments will happily tell you.
The original ending is available as a bonus scene on the DVD, where it is advertised as the "controversial original ending." Yes, coming to a peaceful reconciliation with your enemies is now more controversial than blowing them right the fuck up.