In Chapter I of Steinbeck's Of Mice and Men George tells Lennie:
"Well, look. Lennie--if you jus' happen to get in trouble like you always done before, I want you to come right here an' hide in the brush."
"Hide in the brush," said Lennie slowly.
"Hide in the brush till I come for you. Can you remember that?"
We know that Lennie got in trouble in the town of Weed for making a girl think he was trying to rape her, but we don't know what other kinds of trouble George is referring to. George says "like you always done before." This sounds as if Lennie has caused George many problems, so many that George is actually expecting him to cause another problem when they start working at their next job. We wonder whether Lennie's other misbehavior also involved girls.
Steinbeck evidently has George tell Lennie what to do if he gets in trouble because George will be the only one who knows where Lennie is to be found when the men at the ranch go hunting for him. That means that in the final chapter George will be able to get to Lennie first and will have the opportunity to kill him with the German Luger he stole from Carlson. This is to be a mercy killing to save Lennie from being tortured and lynched by the angry mob.
George does not intend to shoot Lennie when he tells him where to hide. He intends to get to Lennie and help him escape, as he did in Weed. However, after seeing the dead body of Curley's wife in the barn and realizing that Lennie is becoming a potential rapist and killer, George steals the Luger and goes to find Lennie with the intention of shooting him with it. George feels personally responsible for the girl's death, since he brought Lennie to the ranch and had to plead and argue with the Boss to get him his job.
George has many reasons for wanting to kill Lennie now. He feels he can no longer control him, and he can't be watching him all the time. He could get lynched himself. Or else he could get arrested as an accessory--especially if he tried to help Lennie escape. This is a far more serious situation than the one in Weed which almost got them lynched. This is murder. At least it looks like murder in connection with attempted rape. The law would be after them if they tried to escape together. Their names and descriptions are known. They would have to find work somewhere. They couldn't just hide in the mountains indefinitely.
So George had no idea when he told Lennie to come to this spot by the river and hide in the brush that he was going to kill his friend there. That is characteristic of Steinbeck's realistic writing. The novelette is heavily plotted, but it is plotted in such a way that things just seem to happen.