Absolutely. Assuming that you are talking about George killing Lennie, what he did was absolutely justified and might even have been the only moral thing he could have done.
George knows that what Lennie did is not really Lennie's fault. Lennie is just not bright enough to truly be guilty of murder. But Curley is never going to see it that way. He has sworn that he's going to hurt Lennie before Lennie dies and there is no reason to doubt that he will since his father is a powerful man in the area.
So George has two options -- kill Lennie himself or let Curley get his hands on Lennie. Given that choice, killing Lennie in a merciful way is much more humane and is therefore justified.