The relationship between George and Lennie is complex and due to the finality of George's actions at the end, it raises many moral questions. No-one can dispute that George loves Lennie and feels responsible for him:
I got you to look after me, and you’ve got me to look after you,
but he is not ultimately responsible for Lennie's actions. It is difficult for modern readers to rationalize because we can only speculate on the conditions in mental institutions of the day - although there are many horrific stories - or what may have happened to Lennie had he been left to Curly's mercy.
However, George is uneducated and his decision-making ability is also questionable so his decision , at best, is misguided. It is not for an individual to judge or make life-changing or life-ending decisions like that. George does not have the foresight and he certainly lacks the confidence to feel that either of them can escape their current circumstances. Due to the harsh environment and upbringing, and the fact that, in their world, people often do not hold a position any more cherished that animals, George does the only thing he thinks possible to "save" his friend.
George actually needs Lennie as much as Lennie is dependent upon George. In such a brutal environment, caring for Lennie gives meaning to George's life - even if he is unaware of it.
Effectively he ends Lennie's life but also his own!