George kills Lennie because he feels responsible for Lennie's actions. As Lennie's caretaker, he was not there when Lennie accidentally killed Curley's wife. George now feels that he has to shoot Lennie as a way of showing some responsibility for what Lennie has done.
Also, Curley has vowed to make Lennie suffer and George cannot bear to see this happen. The only solution is to kill Lennie before Curley finds him. Curley is cruel. He will make Lennie's final death one of agony. George knows this about Curley. He shoots Lennie out of compassion. He is saving Lennie from brutal treatment.
George figures that Curley will hang Lennie. He knows this is a terrible way to die. He would rather shoot Lennie and get him out of his chance at a gruesome death.
Should Curley not kill Lennie, Lennie would have to be locked away for the rest of his life. George realizes this would be tremendous suffering for Lennie. He shoots him to end his possibility of being locked away for life:
When George hears the men closing in on them, he tells Lennie to look across the river. As he describes for the last time the farm that he and Lennie have so long dreamed of, he lifts Carlson’s gun from his side pocket. With great difficulty he points it at the back of Lennie’s head, and as his hand shakes violently, George pulls the trigger.
so curley does put more pain on lennie as he kills him
George kills Lennie by shooting him in the back of the head to save him from a more painful death at the heads of Curley, who has vowed to make him suffer for the death of his wife. George loves his friend Lennie, whom he has looked after faithfully, and he doesn't want Lennie to die horribly, especially since Lennie has unwittingly taken the life of Curley's wife in much the same way as he petted the puppy too hard or squeezed the mice to death. Lennie didn't know his own strength. When Curley's wife screamed, he didn't know how to make her stop except to do what he did, but he did not intend to kill her.