While I agree that group survival mechanisms have evolved and morality and ethics derive much of their meaning there, I think there is another mechanism fundamentally driving our sense of morality, ethics, and justice. It is love.
My theory is this...
I think we use the term "love" to describe the act of giving from a place of vulnerability. A gift by itself is great, but not yet love. And vulnerability by itself is just risk. It is when giving and vulnerability are done together that we say love is present.
For example, when we give charity, we are giving something but from a place of security. We give money, but leave enough for ourselves. We give time, but will go home at the end of the day. We give our coat, but it is one we don't use anymore. These are all good things to do, necessary things, but they are not love. They are examples of charity, a different word than love. To make them acts love, our money we give would be based only on the other's need. The time we give would not be limited. The coat we share would be our best. When we see these kinds of charity, I believe we call it love.
Even so, where's evolution in this? I think we will find the biological mechanism for love in the same mechanisms where fear is played out. Love is actually our fear mechanisms in a profoundly relaxed state: a state that is only attainable when we perceive another being vulnerable to us. Being safe may relax our fear mechanisms, but perceiving another as actually vulnerable to us is really the ultimate definition of safety and our fear mechanisms have evolved to know this.
A feeling of profound safety is what we call love. It requires the presence of vulnerability in the giver (not the receiver) and is present in equal measures in ALL human beings. It is probably present in all animals that have functioning limbic systems, but that's another story.