George killed Lennie at the end of “Of Mice And Men” because, as his friend, he felt that he owed him a quick and painless death. It was a mercy killing, one that Curley was incapable of, judging from his vow to kill him (Lennie) in the most painful way.
When Lennie accidentally crushed his hand, Curley’s pride was wounded. His wife’s death by Lennie, albeit unintentional, seemed to add salt to Curley’s injury.
George couldn’t have that, so he killed him to save him from suffering Curley’s wrath.
A bullet through the back of the head was George’s mercy.