Law is the codification of public ethics and has the backing of the state.
Ethics is morality accepted by society. Both law and ethics aim to regulate individual behaviour and conduct.
Law has a coercive element to it while ethics has an element of moral persuasion. Ethics set the agenda for positive conduct. Law reprimands or admonishes the action only in violation.