This is a rather complex question. The emotional climax of Of Mice and Men offers us the image of one friend killing the other and we are left asking exactly this question - Why did George kill Lennie?
The most compelling answers have to do with mercy, responsibility, and justice.
After killing Curley's wife, Lennie is being hunted as a murderer. It's likely that he will be shot when the group finds him. Curley wants revenge and would kill Lennie - not for justice, per se, but for revenge and anger. George helps Lennie escape that moment of retribution.
Also, George is responsible for Lennie. George has helped Lennie to escape from punishment for what he did in Weed (which is most likely another murder of the same kind), so George knows exactly what Lennie is capable of doing. When Lennie kills Curley's wife, George is responsible, at least to some extent. George is also generally responsible for "taking care" of Lennie and his last act of responsiblity is to serve Lennie's punishment, which is, in a way, also his own.
Finally, Lennie is a murderer who probably has killed at least twice. He is a danger to the people around him, capable of killing to protect his place in a fantasy where he will be allowed to tend rabbits. George realizes that, among the other fantasies in the book, the most dangerous illusion is that of Lennie's innocence.
Though Lennie may truly be morally innocent and act in ignorance, he is also legally guilty and physically dangerous.
George doesn't want to see Lennie suffer. He knows that Curly is after Lennie for killing his wife, and when he finds him, Curly plans to kill him - and he most likely won't do it in the least painful way possible. George doesn't want to see Lennie tortured. He suggests to Slim that maybe they could convince Curly to turn Lennie over to the authorities, but Slim says that "ain't no good" - that they'd just lock Lennie up, perhaps in an insane asylum, where he'd be miserable.
So, George is left to reflect on Candy's earlier words just after his dog had been killed by Carlson: "I should have done it myself." Candy regrets letting Carlson kill his dog, knowing that his dog's final moments were most likely filled with confusion and fear. By killing Lennie himself, George lets him die a peaceful, painless death - where Lennie's final thoughts are of his dream farm and rabbits, his own vision of utopia.
George kills Lennie as a type of mercy killing. Lennie has killed Curley's wife and the men are hunting him. The reader knows that once Curley finds Lennie that he will kill Lennie. George has always protected Lennie and this is the ultimate act of protection. Lennie's last thoughts are of the dream of land that he and George have shared throughout the novel. Had Lennie met his death at the hands of Curley and the other men, then his last thoughts would have been much more terrifying; thus George killing him is an act of protection.