George feels obliged to kill Lennie in order to prevent him falling into the hands of the vengeful Curley or being turned over to the authorities. Lennie has killed Curley’s wife, albeit wholly accidentally, and something has to be done about him.
George at first wonders whether they shouldn’t just bring Lennie in, but Slim advises against this. Slim points out that they won’t be able to restrain Curley from exacting his revenge, and the only other realistic option would be for Lennie to be committed to an institution. Slim presents this as an equally grim prospect for the hapless Lennie.
And suppose they lock him up and strap him down and put him in a cage. That ain’t no good, George. (chapter 6)
The only thing left, then, as Slim sees it, is for George to finish Lennie off himself, as George will do it with compassion and understanding. Lennie trusts George entirely and in this way he will remain happy to his dying breath. This then, is presented as the best and simplest situation, and George finally acquiesces.
We can ask whether George is entirely justified in this action. Certainly anything seems preferable to the spectacle of the wholly unpleasant and bloodthirsty Curley hunting Lennie down. Committing him to an institution, though, would at least have spared his life; and he is not given this chance. But life for Lennie, bereft of his mentor George, unable to understand what was happening to him, would not have much value. Slim, at any rate, seems to have quite a low opinion of what the authorities might be able to achieve if they were to take Lennie in hand.
There is a possible third option that George might have taken: he might have fled with Lennie himself. He doesn’t ever seem to consider doing this, though. It would not be easy to flee with such a slow-witted companion and they would most probably both be killed.
George’s killing of Lennie is a mercy killing - but it costs him dear. For all the problems that Lennie caused, he was George’s closest companion for many years, and George's hopes and dreams die with him. Lennie’s demise also destroys George, emotionally and spiritually.