We cannot say that there is a single message at the end of the novella. In any masterful work of literature, there are many meanings. Moreover, different aspects of the work impress different readers.
With that said, I believe that the main message is that the world of the migrants workers is such a broken one that some people cannot even survive.
If we look at the book, we see that there is hardship after hardship. As soon as Lennie and George arrive at the ranch, the boss looks at them with suspicion. Once they settle in, Curley has it out for Lennie. At one point, Curley beats him, until Lennie reluctantly defends himself. If we turn our gaze to other characters, the situation is not much better. Candy feels unwanted. Crooks is completely alienated, and even Curley's wife feels alone, even though she just married him.
Apart from these relational problems, there are many other issues. For example, the migrant workers have little money and no dreams. They just exist, better yet, they barely survive.
At the end of the story, we reach the climax. Lennie accidentally kills Curley's wife. George, therefore, has to find him before the other men do. Moreover, he has to kill him, because in such a brutal world, death is the better option. George's love for Lennie will have him pull the trigger.
From this point of view, we can say that the world is so broken that one friend had to kill another in an act of compassion.
Of all the characters, Slim understood. Here is how the book ends:
Slim twitched George’s elbow. “Come on, George. Me an’ you’ll go in an' get a drink." George let himself be helped to his feet. “Yeah, a drink."
Slim said, “You hadda, George. I swear you hadda. Come on with me.”