Åsikter varierar men konsensus (från min läsning) är att det var en förebyggande nåddöd.
George kills Lennie by shooting him in the back of the head to save him from a more painful death at the hands 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.
Curley, of course, is also looking for a way to achieve revenge for Lennie's crushing his hand, so he will definitely try to kill Lennie in the most cruel way possible. He says he will "gut shoot" him. George must save his friend by a mercy killing.