George kills Lennie right before Lennie is about to be caught by a mob of incredibly angry, and incredibly violent, men. Lennie, who is mentally handicapped, has accidentally killed Curley's wife. It is heavily implied that, if the men were to apprehend Lennie, they would kill him brutally. George decides to kill Lennie quickly and painlessly, thus sparing him a torturous death at the hands of the mob. Seen this way, he engages in something of a mercy killing, or euthanasia.
Is George justified in killing Lennie? To even begin to answer such a question, we must place it back within the context of the novel. In other words, we must consider George's act in tandem with the realities of his world, and the choices it offers him. We have to put ourselves in George's shoes, and try to inhabit his particular situation.
Why does George shoot Lennie? He believes that his way of killing Lennie would be far kinder than that of Curley and the mob. Seeing as Curley is openly violent—remember that, earlier in the novel, he beat and bullied Lennie—George's intuition is probably correct. We might agree, then, that it is more merciful, and perhaps more loyal, of George to kill his friend, rather than abandon him to the whims of sadistic people.
Another question to consider is that of Lennie's autonomy. Isn't it presumptuous for George to assume what is and is not a good death for Lennie? Shouldn't he at least ask? Here, however, we must take Lennie's disability into account. Throughout the novel, George takes care of Lennie, as Lennie has the mental capacity of a young child. He unintentionally injures small animals—and, eventually, Curley's wife—because he can't grasp the concept of mortality, much less his own strength. In fact, Lennie doesn't seem to understand what has happened to Curley's wife, and the potential ramifications of her death (that is, a horrific death for Lennie). Thus, while Lennie is absolutely a human being deserving of rights, it could be argued that, due to his impairment, he would be unable to make an informed decision about his life and/or death. We can imagine that, if George had paused to discuss the situation with Lennie, the mob would have caught up with them, overpowered George, and made off with Lennie.
A third factor to consider would be time, or George's lack of it. As noted above, an armed, enraged mob is dashing toward the baffled Lennie. George does not have much time to argue with or question himself, much less Lennie. If he falters, he will run out of time, and he will be unable to help or protect his friend. He is forced to make a rash decision.
Last, it is important to note that George and Lennie are poor laborers in a cruel, unequal world. They have no social or economic resources with which to defend themselves. Clearly George cannot afford a lawyer; besides, Lennie would be long dead by the time George could make it to a nearby town. The same could be said for the option of calling the police—that is, assuming they would believe George's word over Curley's. Ultimately, their world is one of cruelty, inequality, and hopelessness, as encapsulated by Crooks' earlier statement ("Nobody never gets to heaven, and nobody gets no land"). Perhaps, under such circumstances, it is kind for George to provide Lennie with a humane death, as society will show him no mercy.
Again, while there is no simple answer to this question, considering it in light of the novel's wider context provides an opportunity for more productive discussions. The issue of Lennie's death, like everything else in Of Mice and Men, is fraught with ambiguity and unfairness.