According to the dictionary, ‘ethics’ or ‘morality’ have to do with right and wrong conduct in accordance with set rules or standards. Often, ‘morality’ is associated with specific and concrete standards or prescriptions, while ‘ethics’ describes a more generalize and conceptual meta-level view of good and evil.
Often the relation between religion and morality is blurred and confused in the popular imagination, in part because they are intertwined in texts. While interwoven with each other, they are not identical, and the relationship between them can be loose or indirect.
To be sure, there are ethical principles and moral obligations that are stressed in, e.g., the Mosaic Code as it was revealed in the Exodus text. Moses gives, simultaneously, a moral code and a spiritual worldview.
But it is possible to disentangle these: a Mosaic morality and a Mosaic theology can be distinguished from each other. They are not identical, although they are connected by concepts like mercy, grace, and forgiveness.
Moses differentiates, e.g., between a murder and an accidental homicide, and reduces the legal punishment for the latter. He also addresses the notion of deterrence, hoping to prevent crimes rather than avenge them. He introduces, in some cases, a revolutionary equality between men and women.
Moses also establishes a legal recognition that a slave’s life is a human life, and is to be treated as such - not surprising, inasmuch as Moses was establishing a legal and social structure for a nation of escaped slaves.